Merge pull request #28 from cuu/master

add RETRO_CONFIG field in action.config to allow to specify the confi…
This commit is contained in:
clockworkpi 2018-06-11 16:10:01 +08:00 committed by GitHub
commit 83862dcd84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View File

@ -4,3 +4,4 @@ EXT=zip
LAUNCHER=retroarch -L
TITLE=MAME Roms
SO_URL=http://buildbot.libretro.com/nightly/linux/armhf/latest/mame2003_plus_libretro.so.zip
RETRO_CONFIG=/home/cpi/apps/configs/mame.config

View File

@ -312,7 +312,13 @@ class FavListPage(Page):
# check ROM_SO exists
if FileExists(self._Emulator["ROM_SO"]):
escaped_path = CmdClean( cur_li._Path)
cmdpath = " ".join( (self._Emulator["LAUNCHER"],self._Emulator["ROM_SO"], escaped_path))
custom_config = ""
if self._Emulator["RETRO_CONFIG"] != "" and len(self._Emulator["RETRO_CONFIG"]) > 5:
custom_config = " -c " + self._Emulator["RETRO_CONFIG"]
cmdpath = " ".join( (self._Emulator["LAUNCHER"],self._Emulator["ROM_SO"], custom_config, escaped_path))
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
return
else:

View File

@ -341,7 +341,12 @@ class RomListPage(Page):
# check ROM_SO exists
if FileExists(self._Emulator["ROM_SO"]):
escaped_path = CmdClean( cur_li._Path)
cmdpath = " ".join( (self._Emulator["LAUNCHER"],self._Emulator["ROM_SO"], escaped_path))
custom_config = ""
if self._Emulator["RETRO_CONFIG"] != "" and len(self._Emulator["RETRO_CONFIG"]) > 5:
custom_config = " -c " + self._Emulator["RETRO_CONFIG"]
cmdpath = " ".join( (self._Emulator["LAUNCHER"],self._Emulator["ROM_SO"], custom_config, escaped_path))
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
return
else:

View File

@ -409,7 +409,7 @@ class MainScreen(object):
obj["LAUNCHER"] = ""
obj["TITLE"] = "Game"
obj["SO_URL"] = ""
obj["RETRO_CONFIG"] = "" ##
try:
f = open(_dir+"/"+i+"/"+emulator_flag)
except IOError: