From 5e6eecf0afed47607ef8062ce8d4cc9203ffb611 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 13 Feb 2010 21:19:41 +0000 Subject: [PATCH] Ok, this really does it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5052 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_GCPad/Src/GCPad.cpp | 5 ++++- Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp index 87b20d223d..d8b654018e 100644 --- a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp +++ b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp @@ -607,6 +607,7 @@ bool IsKey(int Key) { Ret = GetAsyncKeyState(MapKey); // Keyboard (Windows) } + else if (MapKey < 0x1100) #elif defined HAVE_X11 && HAVE_X11 if (MapKey < 256 || MapKey > 0xf000) { @@ -616,8 +617,10 @@ bool IsKey(int Key) keyCode = XKeysymToKeycode(GCdisplay, MapKey); Ret = (keys[keyCode/8] & (1 << (keyCode%8))); // Keyboard (Linux) } -#endif else if (MapKey < 0x1100) +#else + if (MapKey < 0x1100) +#endif { Ret = SDL_JoystickGetButton(GCMapping[g_ID].joy, MapKey - 0x1000); // Pad button } diff --git a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp index 6e73506975..0ab25ca254 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp @@ -308,6 +308,7 @@ bool IsKey(int Key) { Ret = GetAsyncKeyState(MapKey); // Keyboard (Windows) } + else if (MapKey < 0x1100) #elif defined(HAVE_X11) && HAVE_X11 if (MapKey < 256 || MapKey >= 0xf000) { @@ -317,8 +318,10 @@ bool IsKey(int Key) keyCode = XKeysymToKeycode(WMdisplay, MapKey); Ret = (keys[keyCode/8] & (1 << (keyCode%8))); // Keyboard (Linux) } -#endif else if (MapKey < 0x1100) +#else + if (MapKey < 0x1100) +#endif { Ret = SDL_JoystickGetButton(WiiMapping[g_ID].joy, MapKey - 0x1000); // Pad button }