Small change
This commit is contained in:
parent
638188bcc3
commit
f7034d4a89
@ -5,6 +5,7 @@
|
||||
#include "game/dvars.hpp"
|
||||
|
||||
#include "scheduler.hpp"
|
||||
#include "gui.hpp"
|
||||
|
||||
#include <utils/string.hpp>
|
||||
#include <utils/hook.hpp>
|
||||
@ -83,13 +84,6 @@ 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)
|
||||
{
|
||||
@ -138,7 +132,7 @@ namespace gui
|
||||
|
||||
void post_unpack() override
|
||||
{
|
||||
dxgi_swap_chain_present_hook.create(0x7A13A0_b, dxgi_swap_chain_present_stub);
|
||||
scheduler::loop(on_frame, scheduler::pipeline::renderer);
|
||||
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);
|
||||
r_end_frame_hook.invoke<void>();
|
||||
return 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(0x76D7B0_b, scheduler::r_end_frame_stub);
|
||||
r_end_frame_hook.create(0x7A13A0_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