1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Refactored window flags only being updated every 1000ms.

This commit is contained in:
ZehMatt
2017-07-24 22:33:40 +02:00
committed by Michael Steenbeek
parent fe19d9a2a3
commit fabf7f9fb5

View File

@@ -72,8 +72,6 @@ private:
SDL_Window * _window = nullptr;
sint32 _width = 0;
sint32 _height = 0;
uint32 _windowFlags = 0;
uint32 _windowFlagsLastCheckTick = 0;
bool _resolutionsAllowAnyAspectRatio = false;
std::vector<Resolution> _fsResolutions;
@@ -782,14 +780,7 @@ private:
uint32 GetWindowFlags()
{
// Don't check if window is minimised too frequently (every second is fine)
uint32 tick = Platform::GetTicks();
if (tick > _windowFlagsLastCheckTick + 1000)
{
_windowFlags = SDL_GetWindowFlags(_window);
_windowFlagsLastCheckTick = tick;
}
return _windowFlags;
return SDL_GetWindowFlags(_window);
}
};