diff --git a/main.c b/main.c index fea258b..bcbc469 100644 --- a/main.c +++ b/main.c @@ -537,6 +537,8 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk "filter=nearest\n" "; mouse sensitivity scaling\n" "adjmouse=false\n" + "; enable C&C/RA mouse hack\n" + "mhack=true\n" , fh); fclose(fh); } @@ -578,7 +580,8 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk { This->render.filter = 0; } - GetPrivateProfileStringA("ddraw", "adjmouse", "TRUE", tmp, sizeof(tmp), ini_path); + + GetPrivateProfileStringA("ddraw", "adjmouse", "FALSE", tmp, sizeof(tmp), ini_path); if(tolower(tmp[0]) == 'y' || tolower(tmp[0]) == 't' || tmp[0] == '1') { This->adjmouse = TRUE; @@ -588,6 +591,16 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk This->adjmouse = FALSE; } + GetPrivateProfileStringA("ddraw", "mhack", "TRUE", tmp, sizeof(tmp), ini_path); + if(tolower(tmp[0]) == 'y' || tolower(tmp[0]) == 't' || tmp[0] == '1') + { + This->mhack = TRUE; + } + else + { + This->mhack = FALSE; + } + This->Ref = 0; ddraw_AddRef(This); diff --git a/main.h b/main.h index c24fb10..f218a87 100644 --- a/main.h +++ b/main.h @@ -69,6 +69,7 @@ typedef struct IDirectDrawImpl RECT cursorclip; BOOL locked; BOOL adjmouse; + BOOL mhack; BOOL key_ctrl; BOOL key_tab; diff --git a/mouse.c b/mouse.c index f5f371c..bea2baa 100644 --- a/mouse.c +++ b/mouse.c @@ -168,7 +168,10 @@ void mouse_unlock() void mouse_init(HWND hWnd) { - SetCursor(LoadCursor(NULL, IDC_ARROW)); - hack_iat(&hacks[0]); - mouse_active = TRUE; + if(ddraw->mhack) + { + SetCursor(LoadCursor(NULL, IDC_ARROW)); + hack_iat(&hacks[0]); + mouse_active = TRUE; + } }