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

remove allow_wmactivate setting

This commit is contained in:
FunkyFr3sh 2024-08-10 03:28:12 +02:00
parent d7d12e520f
commit b1c74f1628
3 changed files with 15 additions and 13 deletions

View File

@ -65,7 +65,6 @@ typedef struct CNCDDRAWCONFIG
int guard_lines;
int max_resolutions;
BOOL lock_surfaces;
BOOL allow_wmactivate;
BOOL flipclear;
BOOL fixmousehook;
BOOL rgb555;

View File

@ -78,7 +78,6 @@ void cfg_load()
GET_INT(g_config.guard_lines, "guard_lines", 200);
GET_INT(g_config.max_resolutions, "max_resolutions", 0);
GET_BOOL(g_config.lock_surfaces, "lock_surfaces", FALSE);
GET_BOOL(g_config.allow_wmactivate, "allow_wmactivate", FALSE);
GET_BOOL(g_config.flipclear, "flipclear", FALSE);
GET_BOOL(g_config.fixmousehook, "fixmousehook", FALSE);
GET_BOOL(g_config.rgb555, "rgb555", FALSE);
@ -302,7 +301,6 @@ static void cfg_create_ini()
"guard_lines=200\n"
"max_resolutions=0\n"
"lock_surfaces=false\n"
"allow_wmactivate=false\n"
"flipclear=false\n"
"fixmousehook=false\n"
"rgb555=false\n"
@ -368,7 +366,6 @@ static void cfg_create_ini()
"; Atrox\n"
"[Atrox]\n"
"nonexclusive=true\n"
"allow_wmactivate=true\n"
"\n"
"; Atomic Bomberman\n"
"[BM]\n"
@ -473,10 +470,6 @@ static void cfg_create_ini()
"[Arthur]\n"
"renderer=gdi\n"
"\n"
"; Barbie(R) Photo Designer\n"
"[pdcam]\n"
"allow_wmactivate=true\n"
"\n"
"; Baldur's Gate II\n"
"; Note: 'Use 3D Acceleration' must be disabled and 'Full Screen' must be enabled in BGConfig.exe\n"
"[BGMain]\n"
@ -535,7 +528,6 @@ static void cfg_create_ini()
"\n"
"; Carmen Sandiego's Great Chase - NOT WORKING YET\n"
"[TIME32]\n"
"allow_wmactivate=true\n"
"renderer=gdi\n"
"adjmouse=false\n"
"width=0\n"

View File

@ -557,13 +557,13 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
}
case WM_ACTIVATE:
{
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE)
if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
{
if (g_ddraw.got_child_windows)
RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
}
if (wParam == WA_INACTIVE)
if (LOWORD(wParam) == WA_INACTIVE)
{
if (g_config.windowed && !g_config.fullscreen && lParam && GetParent((HWND)lParam) == hWnd)
{
@ -600,10 +600,21 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
}
}
//if (g_ddraw.windowed || g_ddraw.noactivateapp)
if (g_config.windowed || g_config.noactivateapp)
{
/* let it pass through once (Atrox) */
static BOOL one_time;
if (!one_time)
{
one_time = TRUE;
if (LOWORD(wParam))
break;
}
if (!g_config.allow_wmactivate)
return 0;
}
break;
}