Commit e0e79419b68ce80bb15621e736e37e6f6ae365e5

Sam Lantinga 2023-03-07T10:08:55

Fixed which window we check flags for when updating fullscreen mode

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index f30811c..12f4e21 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -1446,7 +1446,7 @@ static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen)
                 }
 
                 /* only do the mode change if we want exclusive fullscreen */
-                if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
+                if ((other->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
                     if (SDL_SetDisplayModeForDisplay(display, &fullscreen_mode) < 0) {
                         return -1;
                     }