Skip to content

Commit

Permalink
add preset for Nightlong - Union City Conspiracy
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Dec 16, 2024
1 parent c35ca60 commit 82386fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -106,7 +107,6 @@ typedef struct CNCDDRAWCONFIG
BOOL carma95_hack;
BOOL sirtech_hack;
BOOL flightsim98_hack;
BOOL seventhlegion_hack;

} CNCDDRAWCONFIG;

Expand Down
8 changes: 6 additions & 2 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/wndproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 82386fb

Please sign in to comment.