소스 검색

cocoa: Don't overwrite the desktop mode when changing the fullscreen mode

Changing the mode triggers a display reconfiguration event, which will overwrite the desktop mode with the set fullscreen mode, preventing proper restoration when leaving fullscreen. Don't overwrite the desktop mode if the reconfiguration is due to a fullscreen mode switch.
Frank Praznik 1 년 전
부모
커밋
b69201daeb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/video/cocoa/SDL_cocoamodes.m

+ 1 - 1
src/video/cocoa/SDL_cocoamodes.m

@@ -433,7 +433,7 @@ static void Cocoa_DisplayReconfigurationCallback(CGDirectDisplayID displayid, CG
         }
     }
 
-    if (flags & kCGDisplaySetModeFlag) {
+    if ((flags & kCGDisplaySetModeFlag) && !_this->setting_display_mode) {
         if (display) {
             CGDisplayModeRef moderef = CGDisplayCopyDisplayMode(displayid);
             if (moderef) {