Skip to content

Commit

Permalink
Enable resizable window
Browse files Browse the repository at this point in the history
  • Loading branch information
SadPencil committed Sep 19, 2024
1 parent a98ed67 commit 648a2a6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions DXMainClient/DXGUI/GameClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,19 @@ public static void SetGraphicsMode(WindowManager wm)
}

wm.SetBorderlessMode(borderlessWindowedClient);

#if WINFORMS
// Enable resizable window for non-borderless windowed client
// Note: currently, this method is not perfect.
// `wm.WindowSizeChangedByUser` is actively ignored for now. The render size will not be updated to optimal when the window is resized,
// This is because it's hard to get the actual window size excluding window border.
if (!borderlessWindowedClient)
{
wm.SetFormBorderStyle(FormBorderStyle.Sizable);
wm.SetMaximizeBox(true);
}
#endif

#if !XNA

if (borderlessWindowedClient)
Expand Down

0 comments on commit 648a2a6

Please sign in to comment.