Browse Source

Fix black screen when going to fullscreen on Mac OS X

rdb 10 years ago
parent
commit
3f520cad01
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/cocoadisplay/cocoaGraphicsWindow.mm

+ 1 - 1
panda/src/cocoadisplay/cocoaGraphicsWindow.mm

@@ -159,7 +159,7 @@ begin_frame(FrameMode mode, Thread *current_thread) {
   // Set the drawable.
   // Set the drawable.
   if (_properties.get_fullscreen()) {
   if (_properties.get_fullscreen()) {
     // Fullscreen.
     // Fullscreen.
-    [cocoagsg->_context setFullScreen];
+    CGLSetFullScreenOnDisplay((CGLContextObj) [cocoagsg->_context CGLContextObj], CGDisplayIDToOpenGLDisplayMask(_display));
   } else {
   } else {
     // Although not recommended, it is technically possible to
     // Although not recommended, it is technically possible to
     // use the same context with multiple different-sized windows.
     // use the same context with multiple different-sized windows.