Fix game window resolution when resizing during fullscreen on Windows

#3699
This commit is contained in:
2026-08-06 06:56:41 +02:00
parent abb5de31df
commit e0346f506e
2 changed files with 15 additions and 3 deletions
@@ -409,6 +409,17 @@ void WindowsWindow::SetClientBounds(const Rectangle& clientArea)
int32 width = (int32)clientArea.GetWidth();
int32 height = (int32)clientArea.GetHeight();
// Resize during fullscreen
if (changeSize && _swapChain && _swapChain->IsFullscreen())
{
// Go out fullscreen, resize, and then go back in
_swapChain->SetFullscreen(false);
_clientSize = clientArea.Size;
OnResize(width, height);
_swapChain->SetFullscreen(true);
return;
}
if (changeSize)
{
_clientSize = clientArea.Size;