Forráskód Böngészése

Fix initial blank screen on macOS Mojave (except splash).

bruvzg 6 éve
szülő
commit
07aee14dd7
1 módosított fájl, 10 hozzáadás és 0 törlés
  1. 10 0
      platform/osx/os_osx.mm

+ 10 - 0
platform/osx/os_osx.mm

@@ -365,6 +365,8 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto
 	bool imeMode;
 }
 - (void)cancelComposition;
+- (BOOL)wantsUpdateLayer;
+- (void)updateLayer;
 @end
 
 @implementation GodotContentView
@@ -375,6 +377,14 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto
 	}
 }
 
+- (BOOL)wantsUpdateLayer {
+	return YES;
+}
+
+- (void)updateLayer {
+	[OS_OSX::singleton->context update];
+}
+
 - (id)init {
 	self = [super init];
 	trackingArea = nil;