mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Add xemu runner
This commit is contained in:
parent
bcc69327cc
commit
30d1ee3e97
|
@ -10,6 +10,7 @@ __all__ = [
|
|||
# Microsoft based
|
||||
"wine",
|
||||
"dosbox",
|
||||
"xemu",
|
||||
# Multi-system
|
||||
"easyrpg",
|
||||
"mame",
|
||||
|
|
42
lutris/runners/xemu.py
Normal file
42
lutris/runners/xemu.py
Normal 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}
|
Loading…
Reference in a new issue