1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Change openrct2_loop to not draw if window is minimized or otherwise hidden (fixes #2096)

This commit is contained in:
Alexander Overvoorde
2015-10-23 17:33:21 +02:00
parent a24b3e114c
commit 8a23aa1bec

View File

@@ -393,8 +393,11 @@ static void openrct2_loop()
invalidate_sprite_2(&g_sprite_list[i]);
}
rct2_draw();
platform_draw();
if ((SDL_GetWindowFlags(gWindow) & (SDL_WINDOW_MINIMIZED | SDL_WINDOW_HIDDEN)) == 0) {
rct2_draw();
platform_draw();
}
fps++;
if (SDL_GetTicks() - secondTick >= 1000) {
fps = 0;
@@ -426,8 +429,10 @@ static void openrct2_loop()
rct2_update();
rct2_draw();
platform_draw();
if ((SDL_GetWindowFlags(gWindow) & (SDL_WINDOW_MINIMIZED | SDL_WINDOW_HIDDEN)) == 0) {
rct2_draw();
platform_draw();
}
}
} while (!_finished);
}