Mark Sibly 8 years ago
parent
commit
60b36dda11

+ 25 - 5
modules/mojo/app/app.monkey2

@@ -443,7 +443,7 @@ Class AppInstance
 	#end
 	#end
 	Property Renderable:Bool()
 	Property Renderable:Bool()
 		
 		
-		Return _activeWindow And Not _activeWindow.Minimized And Not _frozen
+		Return _activeWindow And Not _activeWindow.Minimized And Not _renderingSuspended
 	End
 	End
 
 
 	#rem monkeydoc @hidden
 	#rem monkeydoc @hidden
@@ -548,6 +548,21 @@ Class AppInstance
 	
 	
 	End
 	End
 
 
+	#rem monkeydoc @hidden
+	#end
+	Method SuspendRendering()
+		
+		_renderingSuspended+=1
+	end
+	
+	#rem monkeydoc @hidden
+	#end
+	Method ResumeRendering()
+		
+		_renderingSuspended=Max( _renderingSuspended-1,0 )
+	End
+	
+
 	Private
 	Private
 	
 	
 	Field _config:StringMap<String>
 	Field _config:StringMap<String>
@@ -561,9 +576,9 @@ Class AppInstance
 
 
 	Field _active:Bool
 	Field _active:Bool
 	Field _activeWindow:Window
 	Field _activeWindow:Window
-
-	Field _frozen:Bool
 	
 	
+	Field _renderingSuspended:int
+
 	Field _keyView:View
 	Field _keyView:View
 	Field _hoverView:View
 	Field _hoverView:View
 	Field _mouseView:View
 	Field _mouseView:View
@@ -1023,8 +1038,10 @@ Class AppInstance
 		Case SDL_APP_WILLENTERBACKGROUND
 		Case SDL_APP_WILLENTERBACKGROUND
 			'Prepare your app to go into the background. Stop loops, etc.
 			'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.
 			'This gets called when the user hits the home button, or gets a call.
+
 			'Print "SDL_APP_WILLENTERBACKGROUND"
 			'Print "SDL_APP_WILLENTERBACKGROUND"
-			_frozen=True
+		
+			SuspendRendering()
 
 
 		Case SDL_APP_DIDENTERBACKGROUND
 		Case SDL_APP_DIDENTERBACKGROUND
 			'This will get called if the user accepted whatever sent your app to the background.
 			'This will get called if the user accepted whatever sent your app to the background.
@@ -1039,9 +1056,12 @@ Class AppInstance
 		Case SDL_APP_DIDENTERFOREGROUND
 		Case SDL_APP_DIDENTERFOREGROUND
 			'Restart your loops here.
 			'Restart your loops here.
 			'Your app is interactive and getting CPU again.
 			'Your app is interactive and getting CPU again.
+
 			'Print "SDL_APP_DIDENTERFOREGROUND"
 			'Print "SDL_APP_DIDENTERFOREGROUND"
+
+			ResumeRendering()
+
 			RequestRender()
 			RequestRender()
-			_frozen=False
 #Endif
 #Endif
      
      
 		End
 		End

+ 1 - 0
modules/std/filesystem/native/filesystem.h

@@ -3,6 +3,7 @@
 #define BB_FILESYSTEM_H
 #define BB_FILESYSTEM_H
 
 
 #include <bbmonkey.h>
 #include <bbmonkey.h>
+#include <bbplatform.h>
 
 
 namespace bbFileSystem{
 namespace bbFileSystem{
 
 

+ 1 - 1
modules/std/filesystem/native/filesystem.mm

@@ -3,7 +3,7 @@
 
 
 #include <UIKit/UIKit.h>
 #include <UIKit/UIKit.h>
 
 
-bbString bbFileSystem::getInteralDir(){
+bbString bbFileSystem::getInternalDir(){
 
 
 	NSString *docs=[@"~/Documents" stringByExpandingTildeInPath];
 	NSString *docs=[@"~/Documents" stringByExpandingTildeInPath];