Add xemu runner

This commit is contained in:
Mathieu Comandon 2022-11-01 20:43:44 -07:00
parent bcc69327cc
commit 30d1ee3e97
2 changed files with 43 additions and 0 deletions

View file

@ -10,6 +10,7 @@ __all__ = [
# Microsoft based
"wine",
"dosbox",
"xemu",
# Multi-system
"easyrpg",
"mame",

42
lutris/runners/xemu.py Normal file
View file

@ -0,0 +1,42 @@
from gettext import gettext as _
from lutris.runners.runner import Runner
from lutris.util import system
class xemu(Runner):
human_name = _("xemu")
platforms = [_("Xbox")]
description = _("Xbox emulator")
runnable_alone = True
runner_executable = "xemu/xemu"
game_options = [
{
"option": "main_file",
"type": "file",
"label": _("ISO file"),
"help": _("DVD image in iso format"),
}
]
runner_options = [
{
"option": "fullscreen",
"label": _("Fullscreen"),
"type": "bool",
"default": True,
},
]
def play(self):
"""Run the game."""
arguments = [self.get_executable()]
fullscreen = self.runner_config.get("fullscreen")
if fullscreen:
arguments.append("-full-screen")
iso = self.game_config.get("main_file") or ""
if not system.path_exists(iso):
return {"error": "FILE_NOT_FOUND", "file": iso}
arguments += ["-dvd_path", iso]
return {"command": arguments}