Skip to content

Commit

Permalink
Support international versions
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim committed Sep 28, 2021
1 parent 312f1e1 commit 9d2d116
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions install_majoras_mask_3d/paths.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from pathlib import Path

GAME_ID = "0004000000125500"
GAME_IDS = ["0004000000125500", "0004000000125600", "00040000000D6E00"]


def get_citra_directory():
Expand Down Expand Up @@ -49,8 +49,11 @@ def get_citra_sysdata_directory():

def _get_citra_load_directory(subdirectory):
citra_settings = get_citra_settings_directory()
load_path = os.path.join(citra_settings, "load", subdirectory, GAME_ID)
return _ensure_exists(load_path)
load_paths = [os.path.join(citra_settings, "load", subdirectory, id) for id in GAME_IDS]
for path in load_paths:
if os.path.isdir(path):
return path
raise FileNotFoundError("Could not find Citra load directory for any Majora's Mask. Something must have gone wrong with the CIA import.")


def _ensure_exists(path):
Expand Down
4 changes: 2 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
print("")
print("In order to continue, you must provide a CIA (sometimes called a ROM) for Majora's Mask 3D. Make sure its version is at least 1.1")
print("Please enter the path to your CIA, e.g. C:/Games/The Legend of Zelda - Majora's Mask 3D.cia")
cia_path = input("> ")
cia_path = input("> ").strip()
while not os.path.isfile(cia_path):
print(f"CIA not found at {cia_path}. Please enter a valid path to your CIA.")
cia_path = input("> ")
cia_path = input("> ").strip()

print("Installing Citra...", end='')
install_and_configure_citra(citra_url)
Expand Down

0 comments on commit 9d2d116

Please sign in to comment.