Skip to content

Commit 1c92a7b

Browse files
authored
Merge pull request ppy#6550 from Susko3/sdl3-window-resize-hack
SDL3: Add hack to make resizing store windowed size to config
2 parents bf27889 + e3c02dc commit 1c92a7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

osu.Framework/Platform/SDL3/SDL3Window.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ protected void HandleEventFromWatch(SDL_Event evt)
335335
case SDL_EventType.SDL_EVENT_WINDOW_RESIZED:
336336
// polling via SDL_PollEvent blocks on resizes (https://stackoverflow.com/a/50858339)
337337
if (!updatingWindowStateAndSize)
338-
fetchWindowSize(storeToConfig: false);
338+
{
339+
bool isUserResizing = SDL_GetGlobalMouseState(null, null).HasFlagFast(SDL_MouseButtonFlags.SDL_BUTTON_LMASK);
340+
fetchWindowSize(storeToConfig: isUserResizing);
341+
}
339342

340343
break;
341344
}

0 commit comments

Comments
 (0)