diff --git a/src/g_game.h b/src/g_game.h index ead5b7ae..9f1b8c5c 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -128,11 +128,11 @@ typedef enum { AXISNONE = 0, AXISTURN, + AXISMOVE, + AXISBRAKE, AXISAIM, AXISLOOK, AXISDEAD, //Axises that don't want deadzones - AXISMOVE, - AXISBRAKE, AXISFIRE, AXISDRIFT, AXISLOOKBACK, diff --git a/src/m_menu.c b/src/m_menu.c index 1dbe458e..ee854113 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2627,21 +2627,27 @@ boolean M_Responder(event_t *ev) accelaxis /= 2; if (ev->data1 == accelaxis) { + const INT32 jacceldeadzone = xmode ? jxdeadzone : jydeadzone; retaxis = xmode ? ev->data2 : ev->data3; if (retaxis != INT32_MAX) { if (cv_moveaxis.value < 0) retaxis = -retaxis; - if (joywaitaccel < thistime && retaxis >= pjoyaccel) // only on upwards event + if (Joystick.bGamepadStyle || retaxis > jacceldeadzone) { - ch = KEY_ENTER; - joywaitaccel = thistime; - if (pjoyaccel == 0 // no previous input? - || ((retaxis < 0) == (pjoyaccel < 0))) // same direction as the current one? - joywaitaccel += NEWTICRATE/3; + if (joywaitaccel < thistime) + { + ch = KEY_ENTER; + joywaitaccel = thistime; + if (pjoyaccel == 0 // no previous input? + || ((retaxis < 0) == (pjoyaccel > 0))) // same direction as the current one? + joywaitaccel += NEWTICRATE/3; + } + pjoyaccel = retaxis; } - pjoyaccel = retaxis; + else + pjoyaccel = 0; } } }