# HG changeset patch # User Patric Stout # Date 2024-01-14 22:41:51 # Node ID 56b8cae2790d078436aca92f77ce475f5e1f1d79 # Parent 526c217dbaa8237e4d9b5a054fbd453fa6a6ffa2 Fix: [SDL2] fullscreen always used the resolution of the first display (#11779) diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -665,7 +665,7 @@ bool VideoDriver_SDL_Base::ToggleFullscr if (fullscreen) { /* Find fullscreen window size */ SDL_DisplayMode dm; - if (SDL_GetCurrentDisplayMode(0, &dm) < 0) { + if (SDL_GetCurrentDisplayMode(SDL_GetWindowDisplayIndex(this->sdl_window), &dm) < 0) { Debug(driver, 0, "SDL_GetCurrentDisplayMode() failed: {}", SDL_GetError()); } else { SDL_SetWindowSize(this->sdl_window, dm.w, dm.h);