From abab38d764b9bb36fe58dc56b6a41814f1b1b36a Mon Sep 17 00:00:00 2001 From: ThirteenAG Date: Fri, 12 Jan 2024 13:19:24 +0800 Subject: [PATCH] move loading limiter to game init - this will keep startup times unaffected --- source/framelimit.ixx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/framelimit.ixx b/source/framelimit.ixx index c6adac84..6bca1e34 100644 --- a/source/framelimit.ixx +++ b/source/framelimit.ixx @@ -240,17 +240,18 @@ public: } }; injector::MakeInline(pattern.get_first(0), pattern.get_first(6)); } + }; + FusionFix::onGameInitEvent() += []() + { // Off Route infinite loading - { - auto pattern = hook::pattern("E8 ? ? ? ? 83 C4 08 84 C0 74 E2"); - if (!pattern.empty()) - injector::MakeCALL(pattern.get_first(), sub_403CD0, true); + auto pattern = hook::pattern("E8 ? ? ? ? 83 C4 08 84 C0 74 E2"); + if (!pattern.empty()) + injector::MakeCALL(pattern.get_first(), sub_403CD0, true); - pattern = hook::pattern("E8 ? ? ? ? 83 C4 0C 84 C0 75 25"); - if (!pattern.empty()) - injector::MakeCALL(pattern.get_first(), sub_403CD0, true); - } + pattern = hook::pattern("E8 ? ? ? ? 83 C4 0C 84 C0 75 25"); + if (!pattern.empty()) + injector::MakeCALL(pattern.get_first(), sub_403CD0, true); }; FusionFix::onShutdownEvent() += []()