mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Set minimum deadzone for menus and prevent setting deadzone to 0 (c Ashnal)
This commit is contained in:
parent
080a4f080a
commit
8724b01ae4
2 changed files with 2 additions and 2 deletions
|
@ -421,7 +421,7 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
|||
#endif
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t deadzone_cons_t[] = {{0, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t deadzone_cons_t[] = {{FRACUNIT/16, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}};
|
||||
|
||||
// don't mind me putting these here, I was lazy to figure out where else I could put those without blowing up the compiler.
|
||||
|
||||
|
|
|
@ -2571,7 +2571,7 @@ boolean M_Responder(event_t *ev)
|
|||
{
|
||||
if (ev->type == ev_joystick && ev->data1 == 0 && joywait < I_GetTime())
|
||||
{
|
||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone.value) >> FRACBITS;
|
||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * max(cv_ydeadzone.value, 3*FRACUNIT/4)) >> FRACBITS;
|
||||
if (ev->data3 != INT32_MAX)
|
||||
{
|
||||
if (Joystick.bGamepadStyle || abs(ev->data3) > jdeadzone)
|
||||
|
|
Loading…
Reference in a new issue