Add PPSSPP runner

This commit is contained in:
Mathieu Comandon 2016-01-06 15:29:33 -08:00
parent 89731d0124
commit d1230de6ea
4 changed files with 46 additions and 1 deletions

View file

@ -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)

View file

@ -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
View 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}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB