Skip to content

Commit

Permalink
Don't store windowed size when in fullscreen
Browse files Browse the repository at this point in the history
WindowState can sometimes be stale as `storeWindowSizeToConfig()`
may be called from `HandleEventFromWatch()`.
  • Loading branch information
Susko3 committed Nov 22, 2024
1 parent 623eef7 commit 63b05d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osu.Framework/Platform/SDL3/SDL3Window_Windowing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -785,9 +786,9 @@ private void storeWindowPositionToConfig()
/// </remarks>
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;
Expand Down

0 comments on commit 63b05d4

Please sign in to comment.