From 82386fbbc462770450651474f69baf743f317a42 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Mon, 16 Dec 2024 06:43:32 +0100 Subject: [PATCH] add preset for Nightlong - Union City Conspiracy --- inc/config.h | 2 +- src/config.c | 8 ++++++-- src/wndproc.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/config.h b/inc/config.h index de782b56b8..e03a8fddf5 100644 --- a/inc/config.h +++ b/inc/config.h @@ -74,6 +74,7 @@ typedef struct CNCDDRAWCONFIG BOOL no_dinput_hook; BOOL direct3d_passthrough; BOOL center_cursor_fix; + BOOL allow_wm_nchittest; char fake_mode[128]; BOOL lock_mouse_top_left; char win_version[32]; @@ -106,7 +107,6 @@ typedef struct CNCDDRAWCONFIG BOOL carma95_hack; BOOL sirtech_hack; BOOL flightsim98_hack; - BOOL seventhlegion_hack; } CNCDDRAWCONFIG; diff --git a/src/config.c b/src/config.c index 5fc3c1fb09..73d33ea139 100644 --- a/src/config.c +++ b/src/config.c @@ -87,6 +87,7 @@ void cfg_load() GET_BOOL(g_config.no_dinput_hook, "no_dinput_hook", FALSE); GET_BOOL(g_config.direct3d_passthrough, "direct3d_passthrough", FALSE); GET_BOOL(g_config.center_cursor_fix, "center_cursor_fix", FALSE); + GET_BOOL(g_config.allow_wm_nchittest, "allow_wm_nchittest", FALSE); GET_STRING("fake_mode", "", g_config.fake_mode, sizeof(g_config.fake_mode)); GET_BOOL(g_config.lock_mouse_top_left, "lock_mouse_top_left", FALSE); GET_STRING("win_version", "", g_config.win_version, sizeof(g_config.win_version)); @@ -116,7 +117,6 @@ void cfg_load() GET_BOOL(g_config.carma95_hack, "carma95_hack", FALSE); GET_BOOL(g_config.sirtech_hack, "sirtech_hack", FALSE); GET_BOOL(g_config.flightsim98_hack, "flightsim98_hack", FALSE); - GET_BOOL(g_config.seventhlegion_hack, "seventhlegion_hack", FALSE); GameHandlesClose = GameHandlesClose || g_config.infantryhack; @@ -395,7 +395,7 @@ static void cfg_create_ini() "; 7th Legion\n" "[legion]\n" "maxgameticks=25\n" - "seventhlegion_hack=true\n" + "allow_wm_nchittest=true\n" "singlecpu=false\n" "\n" "; Atrox\n" @@ -1331,6 +1331,10 @@ static void cfg_create_ini() "checkfile=.\\nox.cfg\n" "maxgameticks=125\n" "\n" + "; Nightlong - Union City Conspiracy\n" + "[NL]\n" + "allow_wm_nchittest=true\n" + "\n" "; Outlaws\n" "[olwin]\n" "noactivateapp=true\n" diff --git a/src/wndproc.c b/src/wndproc.c index 774e534825..54a8831cef 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -101,7 +101,7 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam } case WM_NCHITTEST: { - if (g_config.seventhlegion_hack) + if (g_config.allow_wm_nchittest) break; LRESULT result = DefWindowProc(hWnd, uMsg, wParam, lParam);