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,9 +318,10 @@ class FavListPage(Page):
print("Run ",path)
# check ROM_SO exists
if FileExists(self._Emulator["ROM_SO"]):
escaped_path = CmdClean( path)
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:
@ -328,16 +329,18 @@ class FavListPage(Page):
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))
return
else:
self._Screen.PushPage(self._RomSoConfirmDownloadPage)
self._Screen.Draw()
self._Screen.SwapAndShow()
return
self._Screen.Draw()
self._Screen.SwapAndShow()

View File

@ -358,8 +358,6 @@ class RomListPage(Page):
print("Run ",path)
# check ROM_SO exists
if FileExists(self._Emulator["ROM_SO"]):
if self._Emulator["FILETYPE"] == "dir":
escaped_path = CmdClean(path)
else:
@ -370,13 +368,17 @@ class RomListPage(Page):
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:
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()