mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- fixed potential crash on intermission cast screen
This commit is contained in:
parent
4fb6b7c7d4
commit
a9c0765fe1
1 changed files with 13 additions and 13 deletions
|
@ -848,22 +848,22 @@ bool DIntermissionController::Responder (event_t *ev)
|
|||
{
|
||||
const char *cmd = Bindings.GetBind (ev->data1);
|
||||
|
||||
if (cmd != NULL &&
|
||||
(!stricmp(cmd, "toggleconsole") ||
|
||||
!stricmp(cmd, "screenshot")))
|
||||
if (cmd != nullptr)
|
||||
{
|
||||
if (!stricmp(cmd, "toggleconsole") || !stricmp(cmd, "screenshot"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// The following is needed to be able to enter main menu with a controller,
|
||||
// by pressing buttons that are usually assigned to this action, Start and Back by default
|
||||
if (!stricmp(cmd, "menu_main") || !stricmp(cmd, "pause"))
|
||||
else if (!stricmp(cmd, "menu_main") || !stricmp(cmd, "pause"))
|
||||
{
|
||||
M_StartControlPanel(true);
|
||||
M_SetMenu(NAME_Mainmenu, -1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mScreen->mTicker < 2) return false; // prevent some leftover events from auto-advancing
|
||||
int res = mScreen->Responder(ev);
|
||||
|
|
Loading…
Reference in a new issue