From 67e1e6b07154f52a94fbcf145750f8387feea398 Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Sat, 11 Feb 2023 23:09:31 +0900 Subject: [PATCH] Fix borderless fullscreen window restoring --- Dalamud.Boot/xivfixes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dalamud.Boot/xivfixes.cpp b/Dalamud.Boot/xivfixes.cpp index 3bdf4fe23..bfbca7d8a 100644 --- a/Dalamud.Boot/xivfixes.cpp +++ b/Dalamud.Boot/xivfixes.cpp @@ -197,6 +197,10 @@ void xivfixes::prevent_devicechange_crashes(bool bApply) { } } + // While at it, prevent game from entering restored mode if the game does not have window frames (borderless window/fullscreen.) + if (uMsg == WM_SIZE && wParam == SIZE_RESTORED && (GetWindowLongW(hWnd, GWL_STYLE) & WS_POPUP)) + return ShowWindow(hWnd, SW_MAXIMIZE); + return s_pfnGameWndProc(hWnd, uMsg, wParam, lParam); });