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

tweak aero snap hack

This commit is contained in:
FunkyFr3sh 2024-05-29 05:10:25 +02:00
parent 4de6eee162
commit 8f12004d67
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#define WM_DISPLAYCHANGE_DDRAW WM_APP+116
#define WM_TOGGLE_FULLSCREEN WM_APP+117
#define WM_TOGGLE_MAXIMIZE WM_APP+118
#define WM_RESTORE_STYLE WM_APP+119
#define IDT_TIMER_LEAVE_BNET 541287654

View File

@ -477,7 +477,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return DefWindowProc(hWnd, uMsg, wParam, lParam); /* Carmageddon fix */
}
case WM_NCMOUSELEAVE:
case WM_RESTORE_STYLE:
{
if (!IsWine()) /* hack: disable aero snap */
{
@ -488,7 +488,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
real_SetWindowLongA(g_ddraw.hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX);
}
}
break;
return 0;
}
case WM_SYSCOMMAND:
{
@ -499,6 +499,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
if ((style & WS_MAXIMIZEBOX))
{
real_SetWindowLongA(g_ddraw.hwnd, GWL_STYLE, style & ~WS_MAXIMIZEBOX);
PostMessageA(g_ddraw.hwnd, WM_RESTORE_STYLE, 0, 0);
}
}