parent
f7034d4a89
commit
29c5af9cb6
@ -5,7 +5,6 @@
|
||||
#include "game/dvars.hpp"
|
||||
|
||||
#include "scheduler.hpp"
|
||||
#include "gui.hpp"
|
||||
|
||||
#include <utils/string.hpp>
|
||||
#include <utils/hook.hpp>
|
||||
@ -84,6 +83,13 @@ namespace gui
|
||||
return result;
|
||||
}
|
||||
|
||||
utils::hook::detour dxgi_swap_chain_present_hook;
|
||||
void* dxgi_swap_chain_present_stub()
|
||||
{
|
||||
on_frame();
|
||||
return dxgi_swap_chain_present_hook.invoke<void*>();
|
||||
}
|
||||
|
||||
utils::hook::detour wnd_proc_hook;
|
||||
LRESULT wnd_proc_stub(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
@ -132,7 +138,7 @@ namespace gui
|
||||
|
||||
void post_unpack() override
|
||||
{
|
||||
scheduler::loop(on_frame, scheduler::pipeline::renderer);
|
||||
dxgi_swap_chain_present_hook.create(0x7A13A0_b, dxgi_swap_chain_present_stub);
|
||||
wnd_proc_hook.create(0x650F10_b, wnd_proc_stub);
|
||||
}
|
||||
|
||||
|
@ -94,10 +94,10 @@ namespace scheduler
|
||||
pipelines[type].execute();
|
||||
}
|
||||
|
||||
void* r_end_frame_stub()
|
||||
void r_end_frame_stub()
|
||||
{
|
||||
execute(pipeline::renderer);
|
||||
return r_end_frame_hook.invoke<void*>();
|
||||
r_end_frame_hook.invoke<void>();
|
||||
}
|
||||
|
||||
void server_frame_stub()
|
||||
@ -178,7 +178,7 @@ namespace scheduler
|
||||
|
||||
void post_unpack() override
|
||||
{
|
||||
r_end_frame_hook.create(0x7A13A0_b, scheduler::r_end_frame_stub);
|
||||
r_end_frame_hook.create(0x76D7B0_b, scheduler::r_end_frame_stub);
|
||||
g_run_frame_hook.create(0x4CB030_b, scheduler::server_frame_stub);
|
||||
main_frame_hook.create(0x417FA0_b, scheduler::main_frame_stub);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user