more hook 3/4 performance improvements
This commit is contained in:
parent
9c555c8e05
commit
de02f46413
3 changed files with 81 additions and 90 deletions
|
@ -89,14 +89,10 @@ static HRESULT WINAPI fake_DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion,
|
|||
|
||||
void dinput_hook()
|
||||
{
|
||||
hook_patch_iat(GetModuleHandle(NULL), "dinput.dll", "DirectInputCreateA", (PROC)fake_DirectInputCreateA);
|
||||
hook_patch_iat(GetModuleHandle(NULL), FALSE, "dinput.dll", "DirectInputCreateA", (PROC)fake_DirectInputCreateA);
|
||||
}
|
||||
|
||||
void dinput_unhook()
|
||||
{
|
||||
hook_patch_iat(
|
||||
GetModuleHandle(NULL),
|
||||
"dinput.dll",
|
||||
"DirectInputCreateA",
|
||||
(PROC)GetProcAddress(GetModuleHandle("dinput.dll"), "DirectInputCreateA"));
|
||||
hook_patch_iat(GetModuleHandle(NULL), TRUE, "dinput.dll", "DirectInputCreateA", (PROC)fake_DirectInputCreateA);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue