Skip to content

Commit

Permalink
fix for DX injection
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowTabitha authored Dec 26, 2024
1 parent 9b27ddc commit 4e387bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions events/general_inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def general_injection(file_label, cheatCodeEntry):
folder_path = os.path.join("tmp/tmpROM", folder_name + "/sys/main.dol")
folder_path_raw = os.path.join("tmp/tmpROM", folder_name)
if sys.platform == "win32":
subprocess.run([fetchResource("dependencies/win32/GeckoLoader.exe"), "--hooktype=GX", folder_path, "tmp/codes.txt", "--dest=tmp/tmpDOL"], check=True)
subprocess.run([fetchResource("dependencies/win32/GeckoLoader.exe"), "--hooktype=GX", "--optimize", folder_path, "tmp/codes.txt", "--dest=tmp/tmpDOL"], check=True)
else:
subprocess.run([fetchResource("dependencies/darwin/GeckoLoader"), "--hooktype=GX", folder_path, "tmp/codes.txt", "--dest=tmp/tmpDOL"], check=True)
subprocess.run([fetchResource("dependencies/darwin/GeckoLoader"), "--hooktype=GX", "--optimize", folder_path, "tmp/codes.txt", "--dest=tmp/tmpDOL"], check=True)
os.remove(folder_path)
shutil.move("tmp/tmpDOL/main.dol", folder_path)
if sys.platform == "win32":
Expand Down Expand Up @@ -84,4 +84,4 @@ def general_injection(file_label, cheatCodeEntry):
subprocess.run([fetchResource("dependencies/darwin/pyisotools"), folder_path_raw, "B", "--dest=../../game.iso"], check=True)
file_path = tkinter.filedialog.asksaveasfilename(defaultextension=".iso", initialfile=gameName[:-4] + " (Modded).iso", filetypes=[("ISO Files", "*.iso")])
shutil.move("tmp/game.iso", file_path)
shutil.rmtree("tmp/")
shutil.rmtree("tmp/")

0 comments on commit 4e387bc

Please sign in to comment.