1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-01 10:33:32 +02:00

Fix 1-frame text glitch returning to pause menu from in-game options

The new loop order introduces a glitch where the menu would display
whichever menu was saved to kludge_ingametemp for 1 frame right as the
user returned to the pause menu. This happened because the
game.returntomenu() happens in titleinput(), which comes before
titlerender(). To fix this, we just need to defer it to the end of the
frame.
This commit is contained in:
Misa 2021-01-12 20:11:50 -08:00 committed by Ethan Lee
parent 3da0e31215
commit 8a3e292041

View File

@ -6618,6 +6618,12 @@ void Game::returntoeditor(void)
}
#endif
static void returntoingametemp(void)
{
extern Game game;
game.returntomenu(game.kludge_ingametemp);
}
void Game::returntoingame(void)
{
ingame_titlemode = false;
@ -6633,7 +6639,7 @@ void Game::returntoingame(void)
else
#endif
{
returntomenu(kludge_ingametemp);
DEFER_CALLBACK(returntoingametemp);
gamestate = MAPMODE;
graphics.flipmode = graphics.setflipmode;
if (!map.custommode && !graphics.flipmode)