Commit 12f15aaa74c56c067e1b44e8c6492c65cc663fc1

Ozkan Sezer 2022-04-27T10:03:32

fix build

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index 87d9954..d740f66 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -676,13 +676,13 @@ int
 X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode)
 {
     SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata;
+    SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata;
 
     viddata->last_mode_change_deadline = SDL_GetTicks() + (PENDING_FOCUS_TIME * 2);
 
 #if SDL_VIDEO_DRIVER_X11_XRANDR
     if (data->use_xrandr) {
         Display *display = viddata->display;
-        SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata;
         SDL_DisplayModeData *modedata = (SDL_DisplayModeData *)mode->driverdata;
         int mm_width, mm_height;
         XRRScreenResources *res;