Browse Source

cocoadisplay: Small tweak to fullscreen fix

rdb 3 years ago
parent
commit
2a65f583d0
1 changed files with 7 additions and 9 deletions
  1. 7 9
      panda/src/cocoadisplay/cocoaGraphicsWindow.mm

+ 7 - 9
panda/src/cocoadisplay/cocoaGraphicsWindow.mm

@@ -211,17 +211,15 @@ begin_frame(FrameMode mode, Thread *current_thread) {
   cocoagsg->lock_context();
   cocoagsg->lock_context();
 
 
   // Set the drawable.
   // Set the drawable.
-  if (_properties.get_fullscreen()) {
+  if (_properties.get_fullscreen() && !is_arm64_mac()) {
     // Fullscreen.  Note that this call doesn't work with the newer
     // Fullscreen.  Note that this call doesn't work with the newer
     // Metal-based OpenGL drivers.
     // Metal-based OpenGL drivers.
-    if (!is_arm64_mac()) {
-      CGLError err = CGLSetFullScreenOnDisplay((CGLContextObj) [cocoagsg->_context CGLContextObj], CGDisplayIDToOpenGLDisplayMask(_display));
-      if (err != kCGLNoError) {
-        cocoadisplay_cat.error()
-          << "Failed call to CGLSetFullScreenOnDisplay with display mask "
-          << CGDisplayIDToOpenGLDisplayMask(_display) << ": " << CGLErrorString(err) << "\n";
-        return false;
-      }
+    CGLError err = CGLSetFullScreenOnDisplay((CGLContextObj) [cocoagsg->_context CGLContextObj], CGDisplayIDToOpenGLDisplayMask(_display));
+    if (err != kCGLNoError) {
+      cocoadisplay_cat.error()
+        << "Failed call to CGLSetFullScreenOnDisplay with display mask "
+        << CGDisplayIDToOpenGLDisplayMask(_display) << ": " << CGLErrorString(err) << "\n";
+      return false;
     }
     }
   } else {
   } else {
     // Although not recommended, it is technically possible to use the same
     // Although not recommended, it is technically possible to use the same