Move gamekeydown/deviceResponding memset to D_StartTitle

Fixes an issue where, if the last button used on the menu was ESC going back to the title screen, the connection would be aborted immediately.
This commit is contained in:
toaster 2022-09-13 13:47:39 +01:00
parent d5e6d349a5
commit bff9b59b54
2 changed files with 5 additions and 2 deletions

View file

@ -1933,8 +1933,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
D_QuitNetGame();
CL_Reset();
D_StartTitle();
memset(gamekeydown, 0, sizeof (gamekeydown));
memset(deviceResponding, false, sizeof (deviceResponding));
return false;
}

View file

@ -1001,6 +1001,11 @@ void D_StartTitle(void)
G_SetGametype(GT_RACE); // SRB2kart
paused = false;
advancedemo = false;
// clear cmd building stuff
memset(gamekeydown, 0, sizeof (gamekeydown));
memset(deviceResponding, false, sizeof (deviceResponding));
F_StartTitleScreen();
// Reset the palette