new hook for UpdateDraw2D (should be compatible with DivaGL)

This commit is contained in:
somewhatlurker
2024-02-04 01:21:18 +11:00
parent 60958cc3c1
commit 0b7083edad
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -22,7 +22,7 @@
#pragma comment(lib, "detours.lib")
void(__cdecl* divaEngineUpdate)() = (void(__cdecl*)())0x14018CC40;
void(__cdecl* divaEngineDraw2D)(void* addr) = (void(__cdecl*)(void* addr))ENGINE_DRAW_2D_ADDRESS;
void(__cdecl* divaEngineStageDispShadow)() = (void(__cdecl*)())ENGINE_STAGE_DISP_SHADOW_ADDRESS;
LRESULT CALLBACK MessageWindowProcessCallback(HWND, UINT, WPARAM, LPARAM);
DWORD WINAPI WindowMessageDispatcher(LPVOID);
@@ -396,10 +396,10 @@ void hookedEngineUpdate()
//divaEngineUpdate();
}
void hookedEngineDraw2D(void* addr)
void hookedEngineStageDispShadow()
{
divaEngineStageDispShadow();
TLAC::UpdateDraw2D();
divaEngineDraw2D(addr);
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
@@ -425,7 +425,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&(PVOID&)divaEngineDraw2D, hookedEngineDraw2D);
DetourAttach(&(PVOID&)divaEngineStageDispShadow, hookedEngineStageDispShadow);
DetourTransactionCommit();
//TLAC::InitializeExtraSettings();