diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index 87d99541c..d740f66ae 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;