Skip to content

Commit e3c02dc

Browse files
committed
Add hack to make window resizing store size to config
- Allows users to precisely adjust window size - Keeps the workaround for ppy#6264 (comment)
1 parent 458e5b8 commit e3c02dc

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)