diff --git a/src/g_input.c b/src/g_input.c index 6b0da7e4162d916b51d3629b43f0ba33d3469197..465db0316bfe726b0eafaf9fc70511031c54a6ea 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -543,9 +543,9 @@ INT32 G_RemapGamepadEvent(event_t *event, INT32 *type) const INT16 value = G_GetGamepadAxisValue(event->which, event->key); if (value < -jdeadzone || value > jdeadzone) - *type = ev_keydown; - else *type = ev_keyup; + else + *type = ev_keydown; if (value < -jdeadzone) return KEY_INV_AXES + event->key; diff --git a/src/m_menu.c b/src/m_menu.c index 1d5bd65f3c9b72c0cd6d1356576131b3b4e6c843..51d13df98750606838be02698e559c0470465b23 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3224,7 +3224,6 @@ boolean M_Responder(event_t *ev) static INT32 pjoyx = 0, pjoyy = 0; static INT32 pmousex = 0, pmousey = 0; static INT32 lastx = 0, lasty = 0; - boolean shouldswallowevent = false; void (*routine)(INT32 choice); // for some casting problem if (dedicated || (demoplayback && titledemo) @@ -3240,18 +3239,11 @@ boolean M_Responder(event_t *ev) boolean useEventHandler = false; - if (menuactive && ev->type == ev_gamepad_axis && ev->which == 0) - { - // ALWAYS swallow gamepad axis events, to prevent trickling down to game input - // this applies even if the axis event does not get remapped - shouldswallowevent = true; - } - if (noFurtherInput) { // Ignore input after enter/escape/other buttons // (but still allow shift keyup so caps doesn't get stuck) - return shouldswallowevent; + return false; } else if (menuactive) { @@ -3376,7 +3368,7 @@ boolean M_Responder(event_t *ev) } if (!useEventHandler && ch == -1) - return shouldswallowevent; + return false; else if (ch == gamecontrol[GC_SYSTEMMENU][0] || ch == gamecontrol[GC_SYSTEMMENU][1]) // allow remappable ESC key ch = KEY_ESCAPE; @@ -3609,7 +3601,7 @@ boolean M_Responder(event_t *ev) //currentMenu->lastOn = itemOn; //if (currentMenu->prevMenu) // M_SetupNextMenu(currentMenu->prevMenu); - return shouldswallowevent; + return false; default: CON_Responder(ev);