- added ability to enter main menu from credits screen via controller

There was only one way to enter main menu (by pressing Escape button) from the last intermission screen after episode's end
Controller's buttons that are usually assigned to this action, Start and Back by default, now open main menu as well

https://forum.zdoom.org/viewtopic.php?t=65632
This commit is contained in:
alexey.lysiuk 2019-08-16 10:45:19 +03:00
parent 0d2bdfca99
commit f317f69776

View file

@ -860,6 +860,15 @@ bool DIntermissionController::Responder (event_t *ev)
{
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"))
{
M_StartControlPanel(true);
M_SetMenu(NAME_Mainmenu, -1);
return true;
}
}
if (mScreen->mTicker < 2) return false; // prevent some leftover events from auto-advancing