mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
Allow disabling mouse hacks
This commit is contained in:
parent
d881b92c1c
commit
924a5254a8
15
main.c
15
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);
|
||||
|
||||
|
1
main.h
1
main.h
@ -69,6 +69,7 @@ typedef struct IDirectDrawImpl
|
||||
RECT cursorclip;
|
||||
BOOL locked;
|
||||
BOOL adjmouse;
|
||||
BOOL mhack;
|
||||
|
||||
BOOL key_ctrl;
|
||||
BOOL key_tab;
|
||||
|
Loading…
x
Reference in New Issue
Block a user