1
0
mirror of synced 2025-01-19 23:52:45 +01:00
This commit is contained in:
Boomslangnz 2023-03-12 09:20:48 +13:00
parent 329b3333d2
commit 22068a81d8
2 changed files with 7 additions and 9 deletions

View File

@ -2283,7 +2283,7 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
{ {
hlp.log("In FFBLoop"); hlp.log("In FFBLoop");
if (configGameId != 22 && configGameId != 29 && configGameId != 34) //For games which need code to run quicker etc. Some games will crash if no sleep added if (configGameId != 22 && configGameId != 29 && configGameId != 34 && configGameId != 10) //For games which need code to run quicker etc. Some games will crash if no sleep added
Sleep(2500); Sleep(2500);
Initialize(0); Initialize(0);

View File

@ -70,14 +70,12 @@ void GRID::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers*
{ {
init = true; init = true;
HMODULE hMod = GetModuleHandleA("inpout32.dll"); DWORD ImageBase = (DWORD)GetModuleHandleA(0);
if (hMod)
{ MH_Initialize();
MH_Initialize(); MH_CreateHook((void*)(ImageBase + 0x79CDE0), EnableFFBHook, (void**)&EnableFFBOri);
MH_CreateHook((void*)0xB9CDE0, EnableFFBHook, (void**)&EnableFFBOri); MH_CreateHookApi(L"inpout32.dll", "Out32", Out32Hook, (void**)&Out32Ori);
MH_CreateHookApi(L"inpout32.dll", "Out32", Out32Hook, (void**)&Out32Ori); MH_EnableHook(MH_ALL_HOOKS);
MH_EnableHook(MH_ALL_HOOKS);
}
} }
myTriggers = triggers; myTriggers = triggers;