1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02: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:
Misa 2020-05-18 15:19:56 -07:00 committed by Ethan Lee
parent 72ddd9bdb4
commit a33c460d40

View File

@ -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;
}