Fix /dev/root's d3d crash

This commit is contained in:
momo5502 2016-08-14 15:27:37 +02:00
parent b3b74bf1f4
commit 0e793af68b
2 changed files with 13 additions and 1 deletions

View File

@ -300,7 +300,7 @@ namespace Components
{
AntiCheat::UninstallLibHook();
// Initialize directx :P
// Initialize directx
Utils::Hook::Call<void()>(0x5078C0)();
AntiCheat::InstallLibHook();
@ -324,6 +324,16 @@ namespace Components
AntiCheat::InstallLibHook();
}
void AntiCheat::LostD3DStub()
{
AntiCheat::UninstallLibHook();
// Reset directx
Utils::Hook::Call<void()>(0x508070)();
AntiCheat::InstallLibHook();
}
__declspec(naked) void AntiCheat::CinematicStub()
{
__asm
@ -623,6 +633,7 @@ namespace Components
#else
Utils::Hook(0x507BD5, AntiCheat::PatchWinAPI, HOOK_CALL).Install()->Quick();
Utils::Hook(0x5082FD, AntiCheat::LostD3DStub, HOOK_CALL).Install()->Quick();
Utils::Hook(0x51C76C, AntiCheat::CinematicStub, HOOK_CALL).Install()->Quick();
Utils::Hook(0x418209, AntiCheat::SoundInitStub, HOOK_CALL).Install()->Quick();
Utils::Hook(0x60BE9D, AntiCheat::SoundInitStub, HOOK_CALL).Install()->Quick();

View File

@ -51,6 +51,7 @@ namespace Components
static HANDLE WINAPI LoadLibaryWStub(const wchar_t* library);
#endif
static void LostD3DStub();
static void CinematicStub();
static void SoundInitStub(int a1, int a2, int a3);
static void SoundInitDriverStub();