mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user