diff options
-rw-r--r-- | src/app.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1291,9 +1291,10 @@ void processEvents_App(enum iAppEventMode eventMode) { | |||
1291 | iRoot *oldCurrentRoot = current_Root(); /* restored afterwards */ | 1291 | iRoot *oldCurrentRoot = current_Root(); /* restored afterwards */ |
1292 | SDL_Event ev; | 1292 | SDL_Event ev; |
1293 | iBool gotEvents = iFalse; | 1293 | iBool gotEvents = iFalse; |
1294 | iBool gotRefresh = iFalse; | ||
1294 | iPtrArray windows; | 1295 | iPtrArray windows; |
1295 | init_PtrArray(&windows); | 1296 | init_PtrArray(&windows); |
1296 | while (nextEvent_App_(d, eventMode, &ev)) { | 1297 | while (nextEvent_App_(d, gotRefresh ? postedEventsOnly_AppEventMode : eventMode, &ev)) { |
1297 | #if defined (iPlatformAppleMobile) | 1298 | #if defined (iPlatformAppleMobile) |
1298 | if (processEvent_iOS(&ev)) { | 1299 | if (processEvent_iOS(&ev)) { |
1299 | continue; | 1300 | continue; |
@@ -1364,6 +1365,10 @@ void processEvents_App(enum iAppEventMode eventMode) { | |||
1364 | dispatchCommands_Periodic(&d->periodic); | 1365 | dispatchCommands_Periodic(&d->periodic); |
1365 | continue; | 1366 | continue; |
1366 | } | 1367 | } |
1368 | if (ev.type == SDL_USEREVENT && ev.user.code == refresh_UserEventCode) { | ||
1369 | gotRefresh = iTrue; | ||
1370 | continue; | ||
1371 | } | ||
1367 | #if defined (LAGRANGE_ENABLE_IDLE_SLEEP) | 1372 | #if defined (LAGRANGE_ENABLE_IDLE_SLEEP) |
1368 | if (ev.type == SDL_USEREVENT && ev.user.code == asleep_UserEventCode) { | 1373 | if (ev.type == SDL_USEREVENT && ev.user.code == asleep_UserEventCode) { |
1369 | if (SDL_GetTicks() - d->lastEventTime > idleThreshold_App_ && | 1374 | if (SDL_GetTicks() - d->lastEventTime > idleThreshold_App_ && |