Emulator skip ROM_SO checks if no needs for rom so

This commit is contained in:
cuu 2018-11-17 16:30:47 +08:00
parent be6f539f8e
commit 83a7547a0a
2 changed files with 40 additions and 35 deletions

View File

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

View File

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