浏览代码

Don't save temporary mode changes to the desktop mode

Fixes https://github.com/libsdl-org/SDL/issues/12441

(cherry picked from commit 24ec2ed785f9ca5315a059ecfefd8f9531405958)
Sam Lantinga 1 年之前
父节点
当前提交
70a289076a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/video/SDL_video.c

+ 5 - 0
src/video/SDL_video.c

@@ -1435,6 +1435,11 @@ void SDL_SetDesktopDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode
 {
     SDL_DisplayMode last_mode;
 
+    if (display->fullscreen_window) {
+        // This is a temporary mode change, don't save the desktop mode
+        return;
+    }
+
     SDL_copyp(&last_mode, &display->desktop_mode);
 
     if (display->desktop_mode.internal) {