|
@@ -478,6 +478,8 @@ Class AppInstance
|
|
#end
|
|
#end
|
|
Method UpdateWindows()
|
|
Method UpdateWindows()
|
|
|
|
|
|
|
|
+ If _frozen Return
|
|
|
|
+
|
|
Local render:=_requestRender
|
|
Local render:=_requestRender
|
|
_requestRender=False
|
|
_requestRender=False
|
|
|
|
|
|
@@ -552,6 +554,8 @@ Class AppInstance
|
|
|
|
|
|
Field _active:Bool
|
|
Field _active:Bool
|
|
Field _activeWindow:Window
|
|
Field _activeWindow:Window
|
|
|
|
+
|
|
|
|
+ Field _frozen:Bool
|
|
|
|
|
|
Field _keyView:View
|
|
Field _keyView:View
|
|
Field _hoverView:View
|
|
Field _hoverView:View
|
|
@@ -1001,6 +1005,40 @@ Class AppInstance
|
|
|
|
|
|
mojo.graphics.glutil.glGraphicsSeq+=1
|
|
mojo.graphics.glutil.glGraphicsSeq+=1
|
|
|
|
|
|
|
|
+#if __TARGET__="ios"
|
|
|
|
+
|
|
|
|
+ Case SDL_APP_TERMINATING
|
|
|
|
+ 'Terminate the app.
|
|
|
|
+ 'Shut everything down before returning from this function.
|
|
|
|
+
|
|
|
|
+ Case SDL_APP_LOWMEMORY
|
|
|
|
+ 'You will get this when your app is paused and iOS wants more memory.
|
|
|
|
+ 'Release as much memory as possible.
|
|
|
|
+
|
|
|
|
+ Case SDL_APP_WILLENTERBACKGROUND
|
|
|
|
+ 'Prepare your app to go into the background. Stop loops, etc.
|
|
|
|
+ 'This gets called when the user hits the home button, or gets a call.
|
|
|
|
+ Print "SDL_APP_WILLENTERBACKGROUND"
|
|
|
|
+ _frozen=True
|
|
|
|
+
|
|
|
|
+ Case SDL_APP_DIDENTERBACKGROUND
|
|
|
|
+ 'This will get called if the user accepted whatever sent your app to the background.
|
|
|
|
+ 'If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.
|
|
|
|
+ 'When you get this, you have 5 seconds to save all your state or the app will be terminated.
|
|
|
|
+ 'Your app is NOT active at this point.
|
|
|
|
+
|
|
|
|
+ Case SDL_APP_WILLENTERFOREGROUND
|
|
|
|
+ 'This call happens when your app is coming back to the foreground.
|
|
|
|
+ 'Restore all your state here.
|
|
|
|
+
|
|
|
|
+ Case SDL_APP_DIDENTERFOREGROUND
|
|
|
|
+ 'Restart your loops here.
|
|
|
|
+ 'Your app is interactive and getting CPU again.
|
|
|
|
+ Print "SDL_APP_DIDENTERFOREGROUND"
|
|
|
|
+ RequestRender()
|
|
|
|
+ _frozen=False
|
|
|
|
+#Endif
|
|
|
|
+
|
|
End
|
|
End
|
|
|
|
|
|
End
|
|
End
|
|
@@ -1042,37 +1080,6 @@ Class AppInstance
|
|
|
|
|
|
End
|
|
End
|
|
|
|
|
|
-#if __TARGET__="ios"
|
|
|
|
-
|
|
|
|
- Case SDL_APP_TERMINATING
|
|
|
|
- 'Terminate the app.
|
|
|
|
- 'Shut everything down before returning from this function.
|
|
|
|
- return 0
|
|
|
|
- Case SDL_APP_LOWMEMORY
|
|
|
|
- 'You will get this when your app is paused and iOS wants more memory.
|
|
|
|
- 'Release as much memory as possible.
|
|
|
|
- return 0
|
|
|
|
- Case SDL_APP_WILLENTERBACKGROUND
|
|
|
|
- 'Prepare your app to go into the background. Stop loops, etc.
|
|
|
|
- 'This gets called when the user hits the home button, or gets a call.
|
|
|
|
- return 0
|
|
|
|
- Case SDL_APP_DIDENTERBACKGROUND
|
|
|
|
- 'This will get called if the user accepted whatever sent your app to the background.
|
|
|
|
- 'If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.
|
|
|
|
- 'When you get this, you have 5 seconds to save all your state or the app will be terminated.
|
|
|
|
- 'Your app is NOT active at this point.
|
|
|
|
- return 0
|
|
|
|
- Case SDL_APP_WILLENTERFOREGROUND
|
|
|
|
- 'This call happens when your app is coming back to the foreground.
|
|
|
|
- 'Restore all your state here.
|
|
|
|
- return 0
|
|
|
|
- Case SDL_APP_DIDENTERFOREGROUND
|
|
|
|
- 'Restart your loops here.
|
|
|
|
- 'Your app is interactive and getting CPU again.
|
|
|
|
- return 0
|
|
|
|
-
|
|
|
|
-#Endif
|
|
|
|
-
|
|
|
|
End
|
|
End
|
|
|
|
|
|
Return 1
|
|
Return 1
|