mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fixed WXKeyToString which had several problems, mostly just to get
hotkey configuration working with wx 2.9, but it turned out to be too tempting to use it to hack up OS X keyboard support using wx key events in the "old" input plugins. It was with some reluctance that I used PAD_Input (and copied it for Wiimote as well) as that is clearly a deprecated interface, but this way the hack is contained within the old plugins for when the switchover to ControllerInterface happens. The idea is to provide stable keyboard support on OS X for both GCPad and Wiimote while we debug HID keyboard and real 'mote code. It works pretty well, although the wx approach does impose a few limitations like no arrow keys and left/right side modifier keys are considered equivalent. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5622 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -34,6 +34,9 @@
|
||||
|
||||
extern SWiimoteInitialize g_WiimoteInitialize;
|
||||
|
||||
// Hack to use wx key events
|
||||
extern volatile bool wxkeystate[256];
|
||||
|
||||
namespace WiiMoteEmu
|
||||
{
|
||||
|
||||
@ -319,6 +322,11 @@ bool IsKey(int Key)
|
||||
Ret = (keys[keyCode/8] & (1 << (keyCode%8))); // Keyboard (Linux)
|
||||
}
|
||||
else if (MapKey < 0x1100)
|
||||
#elif defined (USE_WX) && USE_WX
|
||||
if (MapKey < 256) {
|
||||
Ret = wxkeystate[MapKey];
|
||||
}
|
||||
else if (MapKey < 0x1100)
|
||||
#else
|
||||
if (MapKey < 0x1100)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user