|
@@ -219,15 +219,17 @@ class Game(BaseModel):
|
|
|
|
|
|
@property
|
|
|
def retroarch_core_path(self):
|
|
|
- path = ""
|
|
|
+ path = None
|
|
|
retroarch_core = self.game_system.defaults.get("retroarch_core", None)
|
|
|
if retroarch_core:
|
|
|
- path = os.path.join(
|
|
|
- settings.ROMS_DIR,
|
|
|
- "cores",
|
|
|
- retroarch_core + "_libretro.so",
|
|
|
+ path = quote(
|
|
|
+ os.path.join(
|
|
|
+ settings.ROMS_DIR,
|
|
|
+ "cores",
|
|
|
+ retroarch_core + "_libretro.so",
|
|
|
+ )
|
|
|
)
|
|
|
- return quote(path)
|
|
|
+ return path
|
|
|
|
|
|
@property
|
|
|
def webretro_url(self):
|
|
@@ -243,3 +245,14 @@ class Game(BaseModel):
|
|
|
return ""
|
|
|
rom_file = quote(self.rom_file.path)
|
|
|
return f"retroarch -L {self.retroarch_core_path} {rom_file}"
|
|
|
+
|
|
|
+ def cmd(self, platform="linux"):
|
|
|
+ cmd = None
|
|
|
+ if self.retroarch_cmd(platform):
|
|
|
+ return self.retroarch_cmd(platform)
|
|
|
+
|
|
|
+ rom_file = quote(self.rom_file.path)
|
|
|
+ emulator = self.game_system.defaults.get("emulator", None)
|
|
|
+ if emulator == "PCSX2":
|
|
|
+ cmd = f"{emulator} --console --fullscreen --nogui {rom_file}"
|
|
|
+ return cmd
|