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

remove menu in fullscreen/borderless modes

This commit is contained in:
FunkyFr3sh 2023-07-07 20:43:54 +02:00
parent 1f931870d2
commit 6101e34ddd

View File

@ -724,6 +724,9 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
real_GetWindowLongA(
g_ddraw->hwnd,
GWL_STYLE) & ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU));
if (GetMenu(g_ddraw->hwnd))
SetMenu(g_ddraw->hwnd, NULL);
}
else
{
@ -759,7 +762,7 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);
LONG exstyle = real_GetWindowLongA(g_ddraw->hwnd, GWL_EXSTYLE);
AdjustWindowRectEx(&dst, style, GetMenu(g_ddraw->hwnd) != NULL, exstyle);
real_SetWindowPos(
@ -788,6 +791,9 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
}
else
{
if (GetMenu(g_ddraw->hwnd))
SetMenu(g_ddraw->hwnd, NULL);
LONG style = real_GetWindowLongA(g_ddraw->hwnd, GWL_STYLE);
DWORD swp_flags = SWP_SHOWWINDOW;