mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01: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:
parent
3da0e31215
commit
8a3e292041
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue