Merge branch 'gamepad-tweaks' into 'next'

Gamepad Improvements: Round 2

See merge request KartKrew/Kart-Public!24
This commit is contained in:
Sal 2019-01-13 20:32:17 -05:00
commit 9fb290577a
3 changed files with 9 additions and 2 deletions

View File

@ -2076,7 +2076,8 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic
I_OsPolling();
key = I_GetKey();
if (key == KEY_ESCAPE || key == KEY_JOY1+1)
// Any key can be used to abort network connection
if (key != KEY_NULL)
{
CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
// M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress ESC\n"), NULL, MM_NOTHING);

View File

@ -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;

View File

@ -1184,6 +1184,12 @@ boolean HU_Responder(event_t *ev)
|| ev->data1 == KEY_LALT || ev->data1 == KEY_RALT)
return true;
// Ignore non-keyboard keys, except when the talk key is bound
if (ev->data1 >= KEY_MOUSE1
&& (ev->data1 != gamecontrol[gc_talkkey][0]
&& ev->data1 != gamecontrol[gc_talkkey][1]))
return false;
c = (INT32)ev->data1;
// I know this looks very messy but this works. If it ain't broke, don't fix it!