1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Merge pull request #2109 from Overv/develop

Disable drawing if the window is minimized or otherwise hidden
This commit is contained in:
Ted John
2015-10-23 18:22:31 +01:00

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);
}