Jelajahi Sumber

Merge pull request #639 from dgough/master

Fixed pause/resume for PlatformBlackBerry.cpp
Sean Paul Taylor 13 tahun lalu
induk
melakukan
23851da433
1 mengubah file dengan 7 tambahan dan 2 penghapusan
  1. 7 2
      gameplay/src/PlatformBlackBerry.cpp

+ 7 - 2
gameplay/src/PlatformBlackBerry.cpp

@@ -34,6 +34,7 @@ static screen_context_t __screenContext;
 static screen_window_t __screenWindow;
 static screen_event_t __screenEvent;
 static int __screenWindowSize[2];
+static bool __screenFullscreen = false;
 static EGLDisplay __eglDisplay = EGL_NO_DISPLAY;
 static EGLContext __eglContext = EGL_NO_CONTEXT;
 static EGLSurface __eglSurface = EGL_NO_SURFACE;
@@ -1069,14 +1070,18 @@ int Platform::enterMessagePump()
                     switch (state)
                     {
                     case NAVIGATOR_WINDOW_FULLSCREEN:
+                        if (!__screenFullscreen)
+                            __screenFullscreen = true;
                         _game->resume();
                         suspended = false;
                         break;
                     case NAVIGATOR_WINDOW_THUMBNAIL:
                     case NAVIGATOR_WINDOW_INVISIBLE:
-                        if (!suspended)
+                        if (__screenFullscreen && !suspended)
+                        {
                             _game->pause();
-                        suspended = true;
+                            suspended = true;
+                        }
                         break;
                     }
                     break;