Kaynağa Gözat

Fix for iOS splash screens (first frame) not drawing.

Steve Grenier 13 yıl önce
ebeveyn
işleme
f89f8bf414
1 değiştirilmiş dosya ile 10 ekleme ve 5 silme
  1. 10 5
      gameplay/src/PlatformiOS.mm

+ 10 - 5
gameplay/src/PlatformiOS.mm

@@ -444,6 +444,11 @@ int getKey(unichar keyCode);
             if (game == nil)
             {
                 [self startGame];
+                
+                // HACK: Skip the first display update after creating buffers and initializing the game.
+                // If we don't do this, the first frame (which includes any drawing during initialization)
+                // does not make it to the display for some reason.
+                return;
             }
         }
 
@@ -1094,11 +1099,11 @@ void Platform::signalShutdown()
     [__view stopUpdating];
     exit(0);
 }
-
-bool Platform::canExit()
-{
-    return false;
-}
+
+bool Platform::canExit()
+{
+    return false;
+}
 
 unsigned int Platform::getDisplayWidth()
 {