Light cleanup of the detours init system

This commit is contained in:
Kawe Mazidjatari 2022-07-26 03:00:51 +02:00
parent de6aab7252
commit feef90c44f
3 changed files with 18 additions and 12 deletions

View File

@ -127,14 +127,9 @@ void Systems_Init()
QuerySystemInfo();
CFastTimer initTimer;
initTimer.Start();
for (IDetour* pDetour : vDetour)
{
pDetour->GetCon();
pDetour->GetFun();
pDetour->GetVar();
}
initTimer.Start();
DetourInit();
initTimer.End();
spdlog::info("+-------------------------------------------------------------+\n");
@ -427,10 +422,19 @@ void QuerySystemInfo()
}
}
void PrintHAddress() // Test the sigscan results
void DetourInit() // Run the sigscan
{
for (const IDetour* pDetour : vDetour)
{
pDetour->GetCon(); // Constants.
pDetour->GetFun(); // Functions.
pDetour->GetVar(); // Variables.
}
}
void DetourAddress() // Test the sigscan results
{
spdlog::debug("+----------------------------------------------------------------+\n");
for (IDetour* pDetour : vDetour)
for (const IDetour* pDetour : vDetour)
{
pDetour->GetAdr();
}

View File

@ -14,4 +14,6 @@ void Systems_Shutdown();
void WS_Init();
void WS_Shutdown();
void QuerySystemInfo();
void PrintHAddress();
void DetourInit();
void DetourAddress();

View File

@ -131,9 +131,9 @@ DWORD __stdcall ProcessConsoleWorker(LPVOID)
std::getline(std::cin, sCommand);
//-- Debug toggles
if (sCommand == "pattern test") { PrintHAddress(); continue; }
if (sCommand == "sig_getadr") { DetourAddress(); continue; }
// Execute the command in the r5 SQVM
// Execute the command.
Cbuf_AddText(Cbuf_GetCurrentPlayer(), sCommand.c_str(), cmd_source_t::kCommandSrcCode);
Cbuf_Execute();