1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-04 21:34:41 +00:00

Allow downloading data while the game is minimized.

With this change, downloads should no longer abort when the game is
minimized for more than a few seconds.
This commit is contained in:
fgenesis 2013-06-24 03:39:48 +02:00
commit 1897329071
5 changed files with 19 additions and 11 deletions

View file

@ -2727,6 +2727,13 @@ bool Core::isWindowFocus()
return true;
}
void Core::onBackgroundUpdate()
{
#if BBGE_BUILD_SDL
SDL_Delay(200);
#endif
}
void Core::main(float runTime)
{
bool verbose = coreVerboseDebug;
@ -2911,7 +2918,7 @@ void Core::main(float runTime)
{
pollEvents();
//debugLog("app not in input focus");
SDL_Delay(200);
onBackgroundUpdate();
resetTimer();
}