Fix switching to fullscreen mode in D3D11/D3D12 flip presentation modes

This commit is contained in:
2022-03-26 16:48:02 +02:00
parent 33fe5e7518
commit 6e6f2859ab
4 changed files with 40 additions and 13 deletions

View File

@@ -1031,6 +1031,10 @@ LRESULT WindowsWindow::WndProc(UINT msg, WPARAM wParam, LPARAM lParam)
// In this case, we don't resize yet -- we wait until the user stops dragging, and a WM_EXITSIZEMOVE message comes.
UpdateRegion();
}
else if (_isSwitchingFullScreen)
{
// Ignored
}
else
{
// This WM_SIZE come from resizing the window via an API like SetWindowPos() so resize
@@ -1090,6 +1094,12 @@ LRESULT WindowsWindow::WndProc(UINT msg, WPARAM wParam, LPARAM lParam)
Close(ClosingReason::User);
return 0;
}
if (wParam == VK_RETURN)
{
LOG(Info, "Alt+Enter pressed");
SetIsFullscreen(!IsFullscreen());
return 0;
}
break;
case WM_POWERBROADCAST:
switch (wParam)