mirror of
https://github.com/lutris/lutris
synced 2024-10-14 19:53:53 +00:00
Add PPSSPP runner
This commit is contained in:
parent
89731d0124
commit
d1230de6ea
|
@ -4,6 +4,7 @@ import os
|
|||
|
||||
from gi.repository import Gtk, GObject, GdkPixbuf, GLib, Pango
|
||||
|
||||
from lutris.util.log import logger
|
||||
from lutris.downloader import Downloader
|
||||
from lutris.util import datapath
|
||||
from lutris.util.system import reverse_expanduser
|
||||
|
@ -14,6 +15,9 @@ PADDING = 5
|
|||
def get_runner_icon(runner_name, format='image', size=None):
|
||||
icon_path = os.path.join(datapath.get(), 'media/runner_icons',
|
||||
runner_name + '.png')
|
||||
if not os.path.exists(icon_path):
|
||||
logger.error("Unable to find icon '%s'", icon_path)
|
||||
return
|
||||
if format == 'image':
|
||||
icon = Gtk.Image()
|
||||
icon.set_from_file(icon_path)
|
||||
|
|
|
@ -15,7 +15,7 @@ __all__ = (
|
|||
# Nintendo
|
||||
"snes9x", "mupen64plus", "dolphin",
|
||||
# Sony
|
||||
"pcsxr",
|
||||
"pcsxr", "ppsspp",
|
||||
# Sega
|
||||
"osmose", "dgen", "reicast",
|
||||
# Misc legacy systems
|
||||
|
|
41
lutris/runners/ppsspp.py
Normal file
41
lutris/runners/ppsspp.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
import os
|
||||
from lutris import settings
|
||||
from lutris.runners.runner import Runner
|
||||
|
||||
|
||||
class ppsspp(Runner):
|
||||
human_name = "PPSSPP"
|
||||
description = "Sony PSP emulator"
|
||||
platform = "Sony PSP"
|
||||
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, 'ppsspp/PPSSPPSDL')
|
||||
|
||||
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/ppsspp.png
Normal file
BIN
share/lutris/media/runner_icons/ppsspp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Loading…
Reference in a new issue