diff --git a/plugins/onepad/keyboard.cpp b/plugins/onepad/keyboard.cpp index 81c962b969..028b721db7 100644 --- a/plugins/onepad/keyboard.cpp +++ b/plugins/onepad/keyboard.cpp @@ -99,7 +99,7 @@ bool PollForNewKeyboardKeys(u32 &pkey) { // keys that aren't being recognized, bump this number up! for (int key = 0; key < 0x80; key++) { if (CGEventSourceKeyState(kCGEventSourceStateHIDSystemState, key)) { - pkey = key == kVK_Escape ? 0 : key; + pkey = key == kVK_Escape ? UINT32_MAX : key; return true; } } @@ -282,7 +282,7 @@ bool PollForNewKeyboardKeys(u32 &pkey) if (ev != NULL) { if (ev->type == GDK_KEY_PRESS) { - pkey = ev->key.keyval != GDK_KEY_Escape ? ev->key.keyval : 0; + pkey = ev->key.keyval != GDK_KEY_Escape ? ev->key.keyval : UINT32_MAX; return true; } else if (ev->type == GDK_BUTTON_PRESS) { pkey = ev->button.button; diff --git a/plugins/onepad/wx_dialog/dialog.cpp b/plugins/onepad/wx_dialog/dialog.cpp index fa8cd93366..472df66601 100644 --- a/plugins/onepad/wx_dialog/dialog.cpp +++ b/plugins/onepad/wx_dialog/dialog.cpp @@ -577,8 +577,8 @@ void Dialog::config_key(int pad, int key) while (!captured) { if (PollForNewKeyboardKeys(key_pressed)) { // special case for keyboard/mouse to handle multiple keys - // Note: key_pressed == 0 when ESC is hit to abort the capture - if (key_pressed > 0) { + // Note: key_pressed == UINT32_MAX when ESC is hit to abort the capture + if (key_pressed != UINT32_MAX) { clear_key(pad, key); set_keyboard_key(pad, key_pressed, key); m_simulatedKeys[pad][key] = key_pressed;