From a70643c9728edec7d2fa7b5d92d63a7ed5b28c3a Mon Sep 17 00:00:00 2001 From: Nikos Kastellanos Date: Sun, 27 Sep 2026 14:57:05 +0300 Subject: [PATCH] ix SDL2 Fullscreen switching. (fast mode switch)- #2729 fast switching , when the preferred resolution is the CurrentDisplayMode. e.g. graphics.PreferredBackBufferWidth = GraphicsDevice.Adapter.CurrentDisplayMode.Width; graphics.PreferredBackBufferHeight = GraphicsDevice.Adapter.CurrentDisplayMode.Height; graphics.IsFullScreen = true; graphics.ApplyChanges(); --- Platforms/Game/.SDL2/SDLGameWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platforms/Game/.SDL2/SDLGameWindow.cs b/Platforms/Game/.SDL2/SDLGameWindow.cs index e26c943bc..94ef14aa2 100644 --- a/Platforms/Game/.SDL2/SDLGameWindow.cs +++ b/Platforms/Game/.SDL2/SDLGameWindow.cs @@ -623,12 +623,12 @@ internal void EndCreateDevice(int clientWidth, int clientHeight, bool willBeFull } else { + SDL.WINDOW.SetSize(Handle, clientWidth, clientHeight); SDL.WINDOW.SetFullscreen(Handle, Sdl.Window.State.Fullscreen); // If going to exclusive full-screen mode, force the window to minimize on focus loss (Windows only) if (CurrentPlatform.OS == OS.Windows) SDL.SetHint("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "1"); - SDL.WINDOW.SetSize(Handle, clientWidth, clientHeight); _width = clientWidth; _height = clientHeight; }