Revert "Massively improve bootup times"

This reverts commit df2440a3ba.
This commit is contained in:
ineed bots
2023-09-18 00:51:26 -06:00
parent df2440a3ba
commit c1adb9aee3
13 changed files with 1708 additions and 839 deletions

View File

@ -97,15 +97,8 @@ namespace utils::hook
MH_DisableHook(this->place_);
}
void detour::create(void* place, void* target, bool quick)
void detour::create(void* place, void* target)
{
// each detour is ~30ms to install, quick is for instances where we will NEVER need to invoke the original
if (quick)
{
jump(reinterpret_cast<std::uintptr_t>(place), target);
return;
}
this->clear();
this->place_ = place;
@ -117,9 +110,9 @@ namespace utils::hook
this->enable();
}
void detour::create(const size_t place, void* target, bool quick)
void detour::create(const size_t place, void* target)
{
this->create(reinterpret_cast<void*>(place), target, quick);
this->create(reinterpret_cast<void*>(place), target);
}
void detour::clear()

View File

@ -86,8 +86,8 @@ namespace utils::hook
void enable() const;
void disable() const;
void create(void* place, void* target, bool quick = false);
void create(size_t place, void* target, bool quick = false);
void create(void* place, void* target);
void create(size_t place, void* target);
void clear();
template <typename T>