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

add hack for Flight Simulator 98

This commit is contained in:
FunkyFr3sh 2024-09-19 17:58:35 +02:00
parent 66e8d1676f
commit 6977fccdbe
3 changed files with 13 additions and 3 deletions

View File

@ -103,6 +103,7 @@ typedef struct CNCDDRAWCONFIG
BOOL homm_hack;
BOOL carma95_hack;
BOOL sirtech_hack;
BOOL flightsim98_hack;
} CNCDDRAWCONFIG;

View File

@ -113,7 +113,8 @@ void cfg_load()
GET_BOOL(g_config.homm_hack, "homm_hack", FALSE);
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);
GameHandlesClose = GameHandlesClose || g_config.infantryhack;
if (g_config.lock_mouse_top_left)
@ -847,6 +848,14 @@ static void cfg_create_ini()
"[EI]\n"
"hook_peekmessage=true\n"
"\n"
"; Flight Simulator 98\n"
"[FLTSIM95]\n"
"flightsim98_hack=true\n"
"\n"
"; Flight Simulator 98\n"
"[FLTSIM98]\n"
"flightsim98_hack=true\n"
"\n"
"; Fairy Tale About Father Frost, Ivan and Nastya\n"
"[mrazik]\n"
"guard_lines=0\n"

View File

@ -177,7 +177,7 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk
HRESULT ret;
if (util_caller_is_ddraw_wrapper(_ReturnAddress()))
if (util_caller_is_ddraw_wrapper(_ReturnAddress()) || g_config.flightsim98_hack)
{
if (lplpDD)
*lplpDD = NULL;
@ -222,7 +222,7 @@ HRESULT WINAPI DirectDrawCreateEx(GUID* lpGuid, LPVOID* lplpDD, REFIID iid, IUnk
HRESULT ret;
if (util_caller_is_ddraw_wrapper(_ReturnAddress()))
if (util_caller_is_ddraw_wrapper(_ReturnAddress()) || g_config.flightsim98_hack)
{
if (lplpDD)
*lplpDD = NULL;