mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Re-create menu if returntomenu() is given current menu
This fixes a bug where if you had the play menu in a state where the first option was "new game", then kept playing up until a quicksave or telesave was created, then quit to the menu, the menu wouldn't update. Thanks to KSSBrawl for reporting this bug to me: https://cdn.discordapp.com/attachments/708567577978470410/712060797924147240/untitled.webm
This commit is contained in:
parent
72ddd9bdb4
commit
a33c460d40
1 changed files with 7 additions and 1 deletions
|
@ -6583,7 +6583,13 @@ void Game::returntomenu(enum Menu::MenuName t)
|
|||
{
|
||||
if (currentmenuname == t)
|
||||
{
|
||||
//Why are you calling this function then?
|
||||
//Re-create the menu
|
||||
int keep_menu_option = currentmenuoption;
|
||||
createmenu(t, true);
|
||||
if (keep_menu_option < (int) menuoptions.size())
|
||||
{
|
||||
currentmenuoption = keep_menu_option;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue