From 73369679f59a6a8b5227d4da4169929a5362e3ce Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Thu, 10 Jan 2019 04:04:26 -0600 Subject: [PATCH] Fix player 2 not being able to play while the chat is open Also attempts to fix the d-pad typing characters into the chat box. --- src/g_input.c | 2 +- src/hu_stuff.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/g_input.c b/src/g_input.c index d7b7be91..871c1e60 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -120,7 +120,7 @@ void G_MapEventsToControls(event_t *ev) case ev_joystick2: // buttons are virtual keys i = ev->data1; - if (i >= JOYAXISSET || menuactive || CON_Ready() || chat_on) + if (i >= JOYAXISSET || menuactive) break; if (ev->data2 != INT32_MAX) joy2xmove[i] = ev->data2; if (ev->data3 != INT32_MAX) joy2ymove[i] = ev->data3; diff --git a/src/hu_stuff.c b/src/hu_stuff.c index f66aa07b..f28f3c8a 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1179,6 +1179,10 @@ boolean HU_Responder(event_t *ev) || ev->data1 == KEY_LALT || ev->data1 == KEY_RALT) return true; + // Ignore joystick hats + if (ev->data1 >= KEY_HAT1 && ev->data1 <= KEY_HAT1 + 3) + return false; + c = (INT32)ev->data1; // I know this looks very messy but this works. If it ain't broke, don't fix it!