Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
alexey-lysiuk committed Aug 16, 2019
1 parent 0d2bdfc commit f317f69
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/intermission/intermission.cpp
Expand Up @@ -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
Expand Down

0 comments on commit f317f69

Please sign in to comment.