Skip to content

Commit

Permalink
Fix saveless saving and quitting hiding buttons
Browse files Browse the repository at this point in the history
Basically, when you save and quit, if you have a save, it attempts to
return to the `play` menu. Unfortunately for us, if you don't have a
save first, that menu never existed. You went directly from `mainmenu`
to the gameplay state. Since `play` never existed, the code didn't
have any menu to return to, so no buttons got created.

My fix is simple: if the menu isn't found, just make it.
  • Loading branch information
NyakoFox committed Aug 20, 2024
1 parent 9444eaa commit 5407b73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion desktop_version/src/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6535,11 +6535,14 @@ void Game::returntomenu(enum Menu::MenuName t)

if (is_the_menu_we_want)
{
break;
return;
}

i--;
}

// If we didn't find the menu we wanted, just go to the menu we wanted
createmenu(t);
}

void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
Expand Down

0 comments on commit 5407b73

Please sign in to comment.