Changed "Wiimote On" to "Input Active", so you can bypass Wiimote input when you want to use GC controller instead, even though their buttons are binded to the same keys/pads.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4681 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2009-12-11 13:57:25 +00:00
parent a751efcc6e
commit cca6f75110
8 changed files with 85 additions and 74 deletions

View File

@ -299,24 +299,27 @@ int RecordingCheckKeys(int WmNuIr)
int GetMapKeyState(int _MapKey, int Key)
{
const int Page = 0;
if (_MapKey < 256)
#ifdef _WIN32
return GetAsyncKeyState(_MapKey); // Keyboard (Windows)
#else
return KeyStatus[Key]; // Keyboard (Linux)
#endif
if (_MapKey < 0x1100)
return SDL_JoystickGetButton(PadState[Page].joy, _MapKey - 0x1000); // Pad button
else // Pad hat
if (g_Config.bInputActive)
{
u8 HatCode, HatKey;
HatCode = SDL_JoystickGetHat(PadState[Page].joy, (_MapKey - 0x1100) / 0x0010);
HatKey = (_MapKey - 0x1100) % 0x0010;
const int Page = 0;
if (HatCode & HatKey)
return HatKey;
if (_MapKey < 256)
#ifdef _WIN32
return GetAsyncKeyState(_MapKey); // Keyboard (Windows)
#else
return KeyStatus[Key]; // Keyboard (Linux)
#endif
if (_MapKey < 0x1100)
return SDL_JoystickGetButton(PadState[Page].joy, _MapKey - 0x1000); // Pad button
else // Pad hat
{
u8 HatCode, HatKey;
HatCode = SDL_JoystickGetHat(PadState[Page].joy, (_MapKey - 0x1100) / 0x0010);
HatKey = (_MapKey - 0x1100) % 0x0010;
if (HatCode & HatKey)
return HatKey;
}
}
return NULL;
}