From 63b05d46e2281aaff32f6a4657839f25d3306aba Mon Sep 17 00:00:00 2001 From: Susko3 Date: Fri, 22 Nov 2024 23:34:30 +0000 Subject: [PATCH] Don't store windowed size when in fullscreen WindowState can sometimes be stale as `storeWindowSizeToConfig()` may be called from `HandleEventFromWatch()`. --- osu.Framework/Platform/SDL3/SDL3Window_Windowing.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Framework/Platform/SDL3/SDL3Window_Windowing.cs b/osu.Framework/Platform/SDL3/SDL3Window_Windowing.cs index c3622b6b06..8007a4a710 100644 --- a/osu.Framework/Platform/SDL3/SDL3Window_Windowing.cs +++ b/osu.Framework/Platform/SDL3/SDL3Window_Windowing.cs @@ -10,6 +10,7 @@ using System.Linq; using osu.Framework.Bindables; using osu.Framework.Configuration; +using osu.Framework.Extensions.EnumExtensions; using osu.Framework.Logging; using osuTK; using SDL; @@ -785,9 +786,9 @@ private void storeWindowPositionToConfig() /// private bool updatingWindowStateAndSize; - private void storeWindowSizeToConfig() + private unsafe void storeWindowSizeToConfig() { - if (WindowState != WindowState.Normal) + if (WindowState != WindowState.Normal || SDL_GetWindowFlags(SDLWindowHandle).HasFlagFast(SDL_WindowFlags.SDL_WINDOW_FULLSCREEN)) return; storingSizeToConfig = true;