Merge pull request #1112 from Soreepeong/fix/borderless-fullscreen-window-restored-fix

Fix borderless fullscreen window restoring
This commit is contained in:
goat 2023-02-11 15:18:32 +01:00 committed by GitHub
commit 1742ec867c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
});