- don't let joystick/controller axis events register as a keypress for screen advancing.

This commit is contained in:
Christoph Oelckers 2020-01-05 10:36:52 +01:00
parent 9f0bb97e63
commit a3020ed867
2 changed files with 5 additions and 1 deletions

View file

@ -169,7 +169,10 @@ public:
bool CheckAllInput() bool CheckAllInput()
{ {
auto res = keyGetScan(); int res;
do
res = keyGetScan();
while (res > KEY_LASTJOYBUTTON && res < KEY_PAD_LTHUMB_RIGHT); // Controller movement events should not register here.
ClearAllInput(); ClearAllInput();
return res; return res;
} }

View file

@ -474,6 +474,7 @@ bool M_SetMenu(FName menu, int param, FName caller)
M_ClearMenus(); // must be done before starting the level. M_ClearMenus(); // must be done before starting the level.
if (caller == NAME_MainMenu) GameStartupInfo.Episode = param; if (caller == NAME_MainMenu) GameStartupInfo.Episode = param;
STAT_StartNewGame(gVolumeNames[GameStartupInfo.Episode], GameStartupInfo.Skill); STAT_StartNewGame(gVolumeNames[GameStartupInfo.Episode], GameStartupInfo.Skill);
inputState.ClearAllInput();
gi->StartGame(GameStartupInfo); gi->StartGame(GameStartupInfo);
return false; return false;