diff --git a/LunaTranslator/LunaTranslator/scalemethod/external_lossless.py b/LunaTranslator/LunaTranslator/scalemethod/external_lossless.py index 50bd0740..0f2b3a84 100644 --- a/LunaTranslator/LunaTranslator/scalemethod/external_lossless.py +++ b/LunaTranslator/LunaTranslator/scalemethod/external_lossless.py @@ -31,16 +31,17 @@ class Method(scalebase): time.sleep(1) if globalconfig["hooklossless"]: - for pid, exe in ListProcess(): + for pids, exe in ListProcess(): if exe == pexe.replace("/", "\\"): - if pid in self.injectedpids: - continue - dll = os.path.abspath("./files/plugins/hookmagpie.dll") - injecter = os.path.abspath( - "./files/plugins/shareddllproxy{}.exe".format("64") - ) - injectdll(pid, injecter, dll) - self.injectedpids.add(pid) + for pid in pids: + if pid in self.injectedpids: + continue + dll = os.path.abspath("./files/plugins/hookmagpie.dll") + injecter = os.path.abspath( + "./files/plugins/shareddllproxy{}.exe".format("64") + ) + injectdll([pid], injecter, dll) + self.injectedpids.add(pid) break def changestatus(self, hwnd, full): @@ -74,4 +75,4 @@ class Method(scalebase): windows.keybd_event(vkcode, 0, windows.KEYEVENTF_KEYUP, 0) for k in mods: windows.keybd_event(mp1[k], 0, windows.KEYEVENTF_KEYUP, 0) - return True \ No newline at end of file + return True