1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

add preset for Hooligans: Storm over Europe

This commit is contained in:
FunkyFr3sh 2024-10-18 18:42:46 +02:00
parent a4f927b095
commit 856ce8a3af
3 changed files with 8 additions and 1 deletions

View File

@ -78,6 +78,7 @@ typedef struct CNCDDRAWCONFIG
BOOL lock_mouse_top_left;
char win_version[32];
int hook;
BOOL limit_gdi_handles;
BOOL remove_menu;
int refresh_rate;

View File

@ -91,6 +91,7 @@ void cfg_load()
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));
GET_INT(g_config.hook, "hook", 4);
GET_BOOL(g_config.limit_gdi_handles, "limit_gdi_handles", FALSE);
GET_BOOL(g_config.remove_menu, "remove_menu", FALSE);
GET_INT(g_config.refresh_rate, "refresh_rate", 0);
@ -334,6 +335,7 @@ static void cfg_create_ini()
"lock_mouse_top_left=false\n"
";win_version=95\n"
"hook=4\n"
"limit_gdi_handles=false\n"
"remove_menu=false\n"
"refresh_rate=0\n"
"\n"
@ -1028,6 +1030,10 @@ static void cfg_create_ini()
"renderer=opengl\n"
"noactivateapp=true\n"
"\n"
"; Hooligans: Storm over Europe\n"
"[hooligans]\n"
"limit_gdi_handles=true\n"
"\n"
"; Icewind Dale 2\n"
"; Note: 'Full Screen' must be enabled in Config.exe\n"
"; Note: 1070x602 is the lowest possible 16:9 resolution for the Widescreen patch (600/601 height will crash)\n"

View File

@ -1500,7 +1500,7 @@ HRESULT dd_CreateSurface(
}
/* Claw hack: 128x128 surfaces need a DC for custom levels to work properly */
if (InterlockedExchangeAdd(&g_dds_gdi_handles, 0) < 4000 ||
if ((!g_config.limit_gdi_handles && InterlockedExchangeAdd(&g_dds_gdi_handles, 0) < 9000) ||
(dst_surface->width == g_ddraw.width && dst_surface->height == g_ddraw.height) ||
(dst_surface->width == 128 && dst_surface->height == 128))
{