diff --git a/sys.py/UI/Emulator/fav_list_page.py b/sys.py/UI/Emulator/fav_list_page.py index c54a55b..ad2dcf4 100644 --- a/sys.py/UI/Emulator/fav_list_page.py +++ b/sys.py/UI/Emulator/fav_list_page.py @@ -318,25 +318,28 @@ class FavListPage(Page): print("Run ",path) - # check ROM_SO exists - if FileExists(self._Emulator["ROM_SO"]): - escaped_path = CmdClean( 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 + if self._Emulator["FILETYPE"] == "dir": + escaped_path = CmdClean(path) else: + escaped_path = CmdClean(path) - self._Screen.PushPage(self._RomSoConfirmDownloadPage) - self._Screen.Draw() - self._Screen.SwapAndShow() + 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)) + + if self._Emulator["ROM_SO"] =="": #empty means No needs for rom so + pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath)) + else: + if FileExists(self._Emulator["ROM_SO"]): + pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath)) + else: + self._Screen.PushPage(self._RomSoConfirmDownloadPage) + self._Screen.Draw() + self._Screen.SwapAndShow() + return - return self._Screen.Draw() self._Screen.SwapAndShow() diff --git a/sys.py/UI/Emulator/rom_list_page.py b/sys.py/UI/Emulator/rom_list_page.py index 713cbe4..56feae2 100644 --- a/sys.py/UI/Emulator/rom_list_page.py +++ b/sys.py/UI/Emulator/rom_list_page.py @@ -357,27 +357,29 @@ class RomListPage(Page): path = cur_li._Path print("Run ",path) - - # check ROM_SO exists - if FileExists(self._Emulator["ROM_SO"]): - if self._Emulator["FILETYPE"] == "dir": - escaped_path = CmdClean(path) - else: - escaped_path = CmdClean(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 + + if self._Emulator["FILETYPE"] == "dir": + escaped_path = CmdClean(path) else: + escaped_path = CmdClean(path) - self._Screen.PushPage(self._RomSoConfirmDownloadPage) - self._Screen.Draw() - self._Screen.SwapAndShow() - + 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)) + + if self._Emulator["ROM_SO"] =="": #empty means No needs for rom so + pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath)) + else: + if FileExists(self._Emulator["ROM_SO"]): + pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath)) + else: + self._Screen.PushPage(self._RomSoConfirmDownloadPage) + self._Screen.Draw() + self._Screen.SwapAndShow() + return + self._Screen.Draw() self._Screen.SwapAndShow()