Procházet zdrojové kódy

add RETRO_CONFIG field in action.config to allow to specify the configuration file

cuu před 6 roky
rodič
revize
907f36e074

+ 2 - 1
Menu/GameShell/20_Retro Games/MAME/action.config

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

+ 7 - 1
sys.py/UI/Emulator/fav_list_page.py

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

+ 6 - 1
sys.py/UI/Emulator/rom_list_page.py

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

+ 1 - 1
sys.py/UI/main_screen.py

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