p2mic thing
This commit is contained in:
parent
da1a1c7b61
commit
5308b98264
|
@ -297,6 +297,12 @@ InitConfig()
|
||||||
DefaultFamilyKeyBoard[j]);
|
DefaultFamilyKeyBoard[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for FAMICOM microphone in pad 2 pad 1 didn't have it
|
||||||
|
// Takeshi no Chousenjou uses it for example.
|
||||||
|
prefix = "SDL.Input.FamicomPad2.";
|
||||||
|
config->addOption("rp2mic", prefix + "EnableMic", 0);
|
||||||
|
|
||||||
|
|
||||||
const int Hotkeys[HK_MAX] = {
|
const int Hotkeys[HK_MAX] = {
|
||||||
SDLK_F1, // cheat menu
|
SDLK_F1, // cheat menu
|
||||||
SDLK_F2, // bind state
|
SDLK_F2, // bind state
|
||||||
|
|
|
@ -379,11 +379,11 @@ KeyboardCommands()
|
||||||
|
|
||||||
char* movie_fname = "";
|
char* movie_fname = "";
|
||||||
// get the keyboard input
|
// get the keyboard input
|
||||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
|
||||||
g_keyState = SDL_GetKeyboardState(NULL);
|
|
||||||
#else
|
|
||||||
g_keyState = SDL_GetKeyState(NULL);
|
g_keyState = SDL_GetKeyState(NULL);
|
||||||
#endif
|
if (g_keyState[SDLK_BACKQUOTE])
|
||||||
|
IncreaseEmulationSpeed();
|
||||||
|
else
|
||||||
|
DecreaseEmulationSpeed();
|
||||||
|
|
||||||
// check if the family keyboard is enabled
|
// check if the family keyboard is enabled
|
||||||
if(InputType[2] == SIFC_FKB) {
|
if(InputType[2] == SIFC_FKB) {
|
||||||
|
@ -1015,7 +1015,7 @@ FCEUD_UpdateInput()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FCEUD_SetInput(bool fourscore, ESI port0, ESI port1, ESIFC fcexp)
|
void FCEUD_SetInput(bool fourscore, bool microphone, ESI port0, ESI port1, ESIFC fcexp)
|
||||||
{
|
{
|
||||||
eoptions &= ~EO_FOURSCORE;
|
eoptions &= ~EO_FOURSCORE;
|
||||||
if(fourscore) { // Four Score emulation, only support gamepads, nothing else
|
if(fourscore) { // Four Score emulation, only support gamepads, nothing else
|
||||||
|
@ -1028,6 +1028,9 @@ void FCEUD_SetInput(bool fourscore, ESI port0, ESI port1, ESIFC fcexp)
|
||||||
InputType[1]=port1;
|
InputType[1]=port1;
|
||||||
InputType[2]=fcexp;
|
InputType[2]=fcexp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
replaceP2StartWithMicrophone = microphone;
|
||||||
|
|
||||||
InitInputInterface();
|
InitInputInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@ void ConfigButton(char *text, ButtConfig *bc);
|
||||||
|
|
||||||
void InitInputInterface(void);
|
void InitInputInterface(void);
|
||||||
void InputUserActiveFix(void);
|
void InputUserActiveFix(void);
|
||||||
|
|
||||||
|
extern bool replaceP2StartWithMicrophone;
|
||||||
extern ButtConfig GamePadConfig[4][10];
|
extern ButtConfig GamePadConfig[4][10];
|
||||||
//extern ButtConfig powerpadsc[2][12];
|
//extern ButtConfig powerpadsc[2][12];
|
||||||
//extern ButtConfig QuizKingButtons[6];
|
//extern ButtConfig QuizKingButtons[6];
|
||||||
|
|
|
@ -115,7 +115,9 @@ Option Value Description\n\
|
||||||
--user x Set the nickname to use in network play.\n\
|
--user x Set the nickname to use in network play.\n\
|
||||||
--pass x Set password to use for connecting to the server.\n\
|
--pass x Set password to use for connecting to the server.\n\
|
||||||
--netkey s Use string 's' to create a unique session for the game loaded.\n\
|
--netkey s Use string 's' to create a unique session for the game loaded.\n\
|
||||||
--players x Set the number of local players.\n";
|
--players x Set the number of local players.\n\
|
||||||
|
--rp2mic {0,1} Replace Port 2 Start with microphone (Famicom).\n";
|
||||||
|
|
||||||
|
|
||||||
// these should be moved to the man file
|
// these should be moved to the man file
|
||||||
//--nospritelim {0|1} Disables the 8 sprites per scanline limitation.\n
|
//--nospritelim {0|1} Disables the 8 sprites per scanline limitation.\n
|
||||||
|
@ -543,6 +545,14 @@ int main(int argc, char *argv[])
|
||||||
std::string s;
|
std::string s;
|
||||||
g_config->getOption("SDL.InputCfg", &s);
|
g_config->getOption("SDL.InputCfg", &s);
|
||||||
|
|
||||||
|
// set the FAMICOM PAD 2 Mic thing
|
||||||
|
{
|
||||||
|
int t;
|
||||||
|
g_config->getOption("SDL.Input.FamicomPad2.EnableMic", &t);
|
||||||
|
if (t)
|
||||||
|
replaceP2StartWithMicrophone = t;
|
||||||
|
}
|
||||||
|
|
||||||
// update the input devices
|
// update the input devices
|
||||||
UpdateInput(g_config);
|
UpdateInput(g_config);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue