cocoadisplay: Small tweak to fullscreen fix

This commit is contained in:
rdb 2022-12-07 17:16:18 +01:00
parent dcdd504e3f
commit 2a65f583d0

View File

@ -211,10 +211,9 @@ 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)); CGLError err = CGLSetFullScreenOnDisplay((CGLContextObj) [cocoagsg->_context CGLContextObj], CGDisplayIDToOpenGLDisplayMask(_display));
if (err != kCGLNoError) { if (err != kCGLNoError) {
cocoadisplay_cat.error() cocoadisplay_cat.error()
@ -222,7 +221,6 @@ begin_frame(FrameMode mode, Thread *current_thread) {
<< CGDisplayIDToOpenGLDisplayMask(_display) << ": " << CGLErrorString(err) << "\n"; << CGDisplayIDToOpenGLDisplayMask(_display) << ": " << CGLErrorString(err) << "\n";
return false; 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
// context with multiple different-sized windows. If that happens, the // context with multiple different-sized windows. If that happens, the