[Scheduler] Use old hook for renderer pipeline

This commit is contained in:
Diavolo 2022-06-30 12:05:56 +02:00
parent 7f8bf48c91
commit dbef5f7a16
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
4 changed files with 5 additions and 16 deletions

View File

@ -67,9 +67,9 @@ namespace Components
Pipelines[type].execute(); Pipelines[type].execute();
} }
void Scheduler::REndFrame_Hk() void Scheduler::CL_DrawScreen_Hk()
{ {
Utils::Hook::Call<void()>(0x50AB20)(); Utils::Hook::Call<void()>(0x5AC950)();
Execute(Pipeline::RENDERER); Execute(Pipeline::RENDERER);
} }
@ -165,9 +165,7 @@ namespace Components
} }
}); });
Utils::Hook(0x4DBE9A, REndFrame_Hk, HOOK_CALL).install()->quick(); Utils::Hook(0x5ACB99, CL_DrawScreen_Hk, HOOK_CALL).install()->quick();
Utils::Hook(0x518D5C, REndFrame_Hk, HOOK_CALL).install()->quick();
Utils::Hook(0x5ACBA3, REndFrame_Hk, HOOK_CALL).install()->quick();
// Hook G_Glass_Update so we may fix TLS issues // Hook G_Glass_Update so we may fix TLS issues
Utils::Hook(0x416049, ServerFrame_Hk, HOOK_CALL).install()->quick(); Utils::Hook(0x416049, ServerFrame_Hk, HOOK_CALL).install()->quick();

View File

@ -59,7 +59,7 @@ namespace Components
static void Execute(Pipeline type); static void Execute(Pipeline type);
static void REndFrame_Hk(); static void CL_DrawScreen_Hk();
static void ServerFrame_Hk(); static void ServerFrame_Hk();
static void ClientFrame_Hk(int localClientNum); static void ClientFrame_Hk(int localClientNum);
static void MainFrame_Hk(); static void MainFrame_Hk();

View File

@ -142,14 +142,6 @@ namespace Components
} }
} }
void Toast::CL_DrawScreen_Stub(int localClientNum)
{
Utils::Hook::Call<void(int)>(0x5AC950)(localClientNum);
Handler();
}
Toast::Toast() Toast::Toast()
{ {
if (Dedicated::IsEnabled() || Monitor::IsEnabled() || ZoneBuilder::IsEnabled()) if (Dedicated::IsEnabled() || Monitor::IsEnabled() || ZoneBuilder::IsEnabled())
@ -157,7 +149,7 @@ namespace Components
return; return;
} }
Utils::Hook(0x5ACB99, CL_DrawScreen_Stub, HOOK_CALL).install()->quick(); Scheduler::Loop(Handler, Scheduler::Pipeline::RENDERER);
#ifdef TEST_TOAST #ifdef TEST_TOAST
Command::Add("testtoast", []([[maybe_unused]] Command::Params* params) Command::Add("testtoast", []([[maybe_unused]] Command::Params* params)

View File

@ -23,7 +23,6 @@ namespace Components
static void Handler(); static void Handler();
static void Draw(UIToast* toast); static void Draw(UIToast* toast);
static void CL_DrawScreen_Stub(int localClientNum);
static std::queue<UIToast> Queue; static std::queue<UIToast> Queue;
static std::mutex Mutex; static std::mutex Mutex;