1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

use AdjustWindowRectEx

This commit is contained in:
FunkyFr3sh 2022-09-21 21:13:08 +02:00
parent 2194583a03
commit 57678ce9f8

View File

@ -705,9 +705,17 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
RECT dst = { x, y, g_ddraw->render.width + x, g_ddraw->render.height + y };
AdjustWindowRect(&dst, GetWindowLong(g_ddraw->hwnd, GWL_STYLE), GetMenu(g_ddraw->hwnd) != NULL);
real_SetWindowPos(g_ddraw->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
real_MoveWindow(g_ddraw->hwnd, dst.left, dst.top, (dst.right - dst.left), (dst.bottom - dst.top), TRUE);
LONG style = GetWindowLong(g_ddraw->hwnd, GWL_STYLE);
LONG exstyle = GetWindowLong(g_ddraw->hwnd, GWL_EXSTYLE);
AdjustWindowRectEx(&dst, style, GetMenu(g_ddraw->hwnd) != NULL, exstyle);
real_SetWindowPos(
g_ddraw->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
real_MoveWindow(
g_ddraw->hwnd, dst.left, dst.top, (dst.right - dst.left), (dst.bottom - dst.top), TRUE);
BOOL d3d9_active = FALSE;