diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index c727538..3ddf416 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -347,25 +347,14 @@ std::vector check_engines() new Erogos, new Silkysveryveryold, new gazelle, - }; -} - -std::vector ignore_engines() -{ - return { - + // ignore engines new oldSystem40ini, new AdvPlayerHD, new DPM, new Escude_ignore, new Chartreux, - }; -} -std::vector unsafe_check_atlast() -{ - // Put the patterns that might break other games at last - - return { + // + // Put the patterns that might break other games at last new UnisonShift, new Interheart, new Abalone, @@ -398,5 +387,7 @@ std::vector unsafe_check_atlast() new ShinaRio, new Suika2, new KISS, - new EntisGLS}; + new EntisGLS, + // + }; } \ No newline at end of file diff --git a/LunaHook/enginecollection64.cpp b/LunaHook/enginecollection64.cpp index e3dea99..9f43c96 100644 --- a/LunaHook/enginecollection64.cpp +++ b/LunaHook/enginecollection64.cpp @@ -21,9 +21,6 @@ #include "engine64/rpcs3.h" #include "engines/lua/lua51.h" #include "engines/python/Renpy.h" -std::vector ignore_engines() { return {}; } -std::vector unsafe_check_atlast() { return {}; } - std::vector check_engines() { return { diff --git a/LunaHook/enginecontrol.cpp b/LunaHook/enginecontrol.cpp index 144d822..5aaf9a1 100644 --- a/LunaHook/enginecontrol.cpp +++ b/LunaHook/enginecontrol.cpp @@ -5,8 +5,6 @@ WCHAR processName_lower[MAX_PATH]; uintptr_t processStartAddress, processStopAddress; std::vector check_engines(); -std::vector ignore_engines(); -std::vector unsafe_check_atlast(); bool ENGINE::check_function() { @@ -76,46 +74,38 @@ bool checkengine() { auto engines = check_engines(); - auto engineatlast = unsafe_check_atlast(); - auto engineignore = ignore_engines(); std::vector infomations = { "match failed", "attach failed", "attach success"}; - auto allengines = {engines, engineignore, engineatlast}; - int total = [allengines]() - {int _=0;for(auto eng:allengines)_+=eng.size();return _; }(); int current = 0; - for (auto eng : allengines) + for (auto m : engines) { - for (auto m : eng) + current += 1; + + bool matched = safematch(m); + bool attached = matched && safeattach(m); + + // ConsoleOutput("Progress %d/%d, checked engine %s, %s",current,total,m->getenginename(),infomations[matched+attached]); + // ConsoleOutput("Progress %d/%d, %s",current,total,infomations[matched+attached]); + if (matched == false) + continue; + ConsoleOutput(MatchedEngine, m->getenginename()); + if (m->dontstop) { - current += 1; + continue; + } - bool matched = safematch(m); - bool attached = matched && safeattach(m); + if (m->is_engine_certain) + { + ConsoleOutput(ConfirmStop, m->getenginename()); + return attached; + } - // ConsoleOutput("Progress %d/%d, checked engine %s, %s",current,total,m->getenginename(),infomations[matched+attached]); - // ConsoleOutput("Progress %d/%d, %s",current,total,infomations[matched+attached]); - if (matched == false) - continue; - ConsoleOutput(MatchedEngine, m->getenginename()); - if (m->dontstop) - { - continue; - } - - if (m->is_engine_certain) - { - ConsoleOutput(ConfirmStop, m->getenginename()); - return attached; - } - - if (attached) - { - ConsoleOutput(Attach_Stop, m->getenginename()); - return true; - } + if (attached) + { + ConsoleOutput(Attach_Stop, m->getenginename()); + return true; } }