diff --git a/plugins/LilyPad/InputManager.cpp b/plugins/LilyPad/InputManager.cpp index 4fbe503266..2055d30ec4 100644 --- a/plugins/LilyPad/InputManager.cpp +++ b/plugins/LilyPad/InputManager.cpp @@ -161,14 +161,16 @@ void Device::CalcVirtualState() { if (!(virtualControlState[index]>>15) != !(oldVirtualControlState[index]>>15) && c->vkey) { // Check for alt-F4 to avoid toggling skip mode incorrectly. if (c->vkey == VK_F4) { - for (int i=0; i>15)) event = KEYRELEASE; diff --git a/plugins/LilyPad/InputManager.h b/plugins/LilyPad/InputManager.h index bb4d440c32..bd53c5b004 100644 --- a/plugins/LilyPad/InputManager.h +++ b/plugins/LilyPad/InputManager.h @@ -15,7 +15,9 @@ * Still more effort than it's worth to port to Linux, however. */ -// Match DirectInput8 values. +// Mostly match DirectInput8 values. Note that these are for physical controls. +// One physical axis maps to 3 virtual ones, and one physical POV control maps to +// 4 virtual ones. enum ControlType { NO_CONTROL = 0, // Axes are ints. Relative axes are for mice, mice wheels, etc, @@ -35,6 +37,9 @@ enum ControlType { // that range is treated as -1 (Though 36000-37000 is treated // like 0 to 1000, just in case). POV = 16, + + // Pressure sensitive buttons. Only a different type because + // they have configurable dead zones, unlike push or toggle buttons. PRESSURE_BTN = 32, }; diff --git a/plugins/LilyPad/WindowsKeyboard.cpp b/plugins/LilyPad/WindowsKeyboard.cpp index 6144ef360c..4141113a90 100644 --- a/plugins/LilyPad/WindowsKeyboard.cpp +++ b/plugins/LilyPad/WindowsKeyboard.cpp @@ -25,7 +25,7 @@ void WindowsKeyboard::UpdateKey(int vkey, int state) { int newState = state * FULLY_DOWN; if (newState != physicalControlState[vkey]) { // Check for alt-F4 to avoid toggling skip mode incorrectly. - if (vkey != VK_F4 || !(physicalControls[VK_MENU].vkey || physicalControls[VK_MENU].vkey || physicalControls[VK_MENU].vkey)) { + if (vkey != VK_F4 || !(physicalControlState[VK_MENU] || physicalControlState[VK_RMENU] || physicalControlState[VK_LMENU])) { int event = KEYPRESS; if (!newState) event = KEYRELEASE; QueueKeyEvent(vkey, event);