Fix 1-frame glitch returning from in-game options with Flip Mode on

If you had Flip Mode enabled when exiting from in-game options, the game
would flash the in-game options menu as flipped for 1 frame before
returning to the pause menu.

To fix this, just defer the Flip Mode variable assignment to be done at
the end of the frame.
This commit is contained in:
Misa authored and Ethan Lee committed 2021-05-11 23:09:23 -04:00
1 parent 673699cef5
commit 21dc90dd0e
1 file changed
+6 -1
+6 -1
View File
@@ -6725,6 +6725,11 @@ static void setfademode(void)
graphics.fademode = graphics.ingame_fademode;
}
static void setflipmode(void)
{
graphics.flipmode = graphics.setflipmode;
}
void Game::returntoingame(void)
{
ingame_titlemode = false;
@@ -6742,7 +6747,7 @@ void Game::returntoingame(void)
{
DEFER_CALLBACK(returntoingametemp);
gamestate = MAPMODE;
graphics.flipmode = graphics.setflipmode;
DEFER_CALLBACK(setflipmode);
DEFER_CALLBACK(setfademode);
if (!map.custommode && !graphics.flipmode)
{