1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

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 2021-05-11 20:03:11 -07:00 committed by Ethan Lee
parent 673699cef5
commit 21dc90dd0e

View file

@ -6725,6 +6725,11 @@ static void setfademode(void)
graphics.fademode = graphics.ingame_fademode; graphics.fademode = graphics.ingame_fademode;
} }
static void setflipmode(void)
{
graphics.flipmode = graphics.setflipmode;
}
void Game::returntoingame(void) void Game::returntoingame(void)
{ {
ingame_titlemode = false; ingame_titlemode = false;
@ -6742,7 +6747,7 @@ void Game::returntoingame(void)
{ {
DEFER_CALLBACK(returntoingametemp); DEFER_CALLBACK(returntoingametemp);
gamestate = MAPMODE; gamestate = MAPMODE;
graphics.flipmode = graphics.setflipmode; DEFER_CALLBACK(setflipmode);
DEFER_CALLBACK(setfademode); DEFER_CALLBACK(setfademode);
if (!map.custommode && !graphics.flipmode) if (!map.custommode && !graphics.flipmode)
{ {