mirror of
https://github.com/lutris/lutris
synced 2024-10-14 11:42:36 +00:00
Add PCSX2 runner
This commit is contained in:
parent
d1230de6ea
commit
e1b5cf7603
|
@ -15,7 +15,7 @@ __all__ = (
|
|||
# Nintendo
|
||||
"snes9x", "mupen64plus", "dolphin",
|
||||
# Sony
|
||||
"pcsxr", "ppsspp",
|
||||
"pcsxr", "ppsspp", "pcsx2",
|
||||
# Sega
|
||||
"osmose", "dgen", "reicast",
|
||||
# Misc legacy systems
|
||||
|
|
41
lutris/runners/pcsx2.py
Normal file
41
lutris/runners/pcsx2.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
import os
|
||||
from lutris import settings
|
||||
from lutris.runners.runner import Runner
|
||||
|
||||
|
||||
class pcsx2(Runner):
|
||||
human_name = "PCSX2"
|
||||
description = "Playstation 2 emulator"
|
||||
platform = "Sony Playstation 2"
|
||||
game_options = [
|
||||
{
|
||||
'option': 'main_file',
|
||||
'type': 'file',
|
||||
'label': 'ISO file',
|
||||
'default_path': 'game_path'
|
||||
}
|
||||
]
|
||||
|
||||
runner_options = [
|
||||
{
|
||||
'option': 'fullscreen',
|
||||
'type': 'bool',
|
||||
'label': 'Fullscreen',
|
||||
'default': False,
|
||||
}
|
||||
]
|
||||
|
||||
def get_executable(self):
|
||||
return os.path.join(settings.RUNNER_DIR, 'pcsx2/PCSX2')
|
||||
|
||||
def play(self):
|
||||
arguments = [self.get_executable()]
|
||||
|
||||
if self.runner_config.get('fullscreen'):
|
||||
arguments.append('--fullscreen')
|
||||
|
||||
iso = self.game_config.get('main_file') or ''
|
||||
if not os.path.exists(iso):
|
||||
return {'error': 'FILE_NOT_FOUND', 'file': iso}
|
||||
arguments.append(iso)
|
||||
return {'command': arguments}
|
BIN
share/lutris/media/runner_icons/pcsx2.png
Normal file
BIN
share/lutris/media/runner_icons/pcsx2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
Loading…
Reference in a new issue