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

filter WM_NCACTIVATE with noactivateapp=true

This commit is contained in:
FunkyFr3sh 2020-10-14 10:58:59 +02:00
parent a72a95baca
commit 85115cbf16
2 changed files with 10 additions and 2 deletions

View File

@ -281,7 +281,7 @@ static void cfg_create_ini()
"; Use the following settings in case there are any issues with the game\n"
"\n"
"\n"
"; Hide WM_ACTIVATEAPP messages to prevent problems on alt+tab\n"
"; Hide WM_ACTIVATEAPP and WM_NCACTIVATE messages to prevent problems on alt+tab\n"
"noactivateapp=false\n"
"\n"
"; Max game ticks per second, possible values: -1 = disabled, 0 = emulate 60hz vblank, 1-1000 = custom game speed\n"

View File

@ -21,7 +21,6 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
switch(uMsg)
{
//case WM_NCACTIVATE:
case WM_GETMINMAXINFO:
case WM_MOVING:
case WM_NCLBUTTONDOWN:
@ -30,6 +29,15 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
{
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
case WM_NCACTIVATE:
{
if (g_ddraw->noactivateapp)
{
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
break;
}
case WM_NCHITTEST:
{
LRESULT result = DefWindowProc(hWnd, uMsg, wParam, lParam);