-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathhooks.cpp
30 lines (23 loc) · 998 Bytes
/
hooks.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "stdafx.h"
#include "imgui/imgui.h"
#include "imgui/imgui_impl_dx12.h"
#include "imgui/imgui_impl_win32.h"
namespace hooks {
void Init() {
if (kiero::init(kiero::RenderType::D3D12) == kiero::Status::Success) {
kiero::bind(54, (void**)&d3d12hook::oExecuteCommandListsD3D12, d3d12hook::hookExecuteCommandListsD3D12);
kiero::bind(58, (void**)&d3d12hook::oSignalD3D12, d3d12hook::hookSignalD3D12);
kiero::bind(140, (void**)&d3d12hook::oPresentD3D12, d3d12hook::hookPresentD3D12);
kiero::bind(84, (void**)&d3d12hook::oDrawInstancedD3D12, d3d12hook::hookkDrawInstancedD3D12);
kiero::bind(85, (void**)&d3d12hook::oDrawIndexedInstancedD3D12, d3d12hook::hookDrawIndexedInstancedD3D12);
do {
Sleep(100);
} while (!(GetAsyncKeyState(globals::uninjectKey) & 0x1));
d3d12hook::release();
kiero::shutdown();
inputhook::Remove(globals::mainWindow);
Beep(220, 100);
FreeLibraryAndExitThread(globals::mainModule, 0);
}
}
}