mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 18:28:50 +01:00
add dosbox on fav
This commit is contained in:
parent
7569c9968d
commit
7ec97f3e12
@ -122,16 +122,12 @@ class FavListPage(Page):
|
|||||||
|
|
||||||
for i ,v in enumerate(files_path):
|
for i ,v in enumerate(files_path):
|
||||||
dirmap = {}
|
dirmap = {}
|
||||||
#if os.path.isdir(v):
|
if os.path.isdir(v) and self._Emulator["FILETYPE"] == "dir": ## like DOSBOX
|
||||||
# continue
|
gameshell_bat = self._Emulator["EXT"][0]
|
||||||
# dir_base_name = os.path.basename(v)
|
if FileExists(v+"/"+gameshell_bat):
|
||||||
# if dir_base_name == ".Trash" or dir_base_name == ".Fav":
|
dirmap["gamedir"] = v.decode("utf8")
|
||||||
# pass
|
ret.append(dirmap)
|
||||||
# else:
|
if os.path.isfile(v) and self._Emulator["FILETYPE"] == "file":
|
||||||
# dirmap["directory"] = v
|
|
||||||
# ret.append(dirmap)
|
|
||||||
|
|
||||||
if os.path.isfile(v):
|
|
||||||
stats = os.stat(v)
|
stats = os.stat(v)
|
||||||
if stats.st_gid != self._Parent._FavGID:
|
if stats.st_gid != self._Parent._FavGID:
|
||||||
continue
|
continue
|
||||||
@ -190,6 +186,9 @@ class FavListPage(Page):
|
|||||||
li.Init(v["directory"])
|
li.Init(v["directory"])
|
||||||
elif "file" in v:
|
elif "file" in v:
|
||||||
li.Init(v["file"])
|
li.Init(v["file"])
|
||||||
|
|
||||||
|
elif "gamedir" in v:
|
||||||
|
li.Init(v["gamedir"])
|
||||||
else:
|
else:
|
||||||
li.Init("NoName")
|
li.Init("NoName")
|
||||||
|
|
||||||
@ -307,11 +306,16 @@ class FavListPage(Page):
|
|||||||
self._Screen._MsgBox.SetText("Launching...")
|
self._Screen._MsgBox.SetText("Launching...")
|
||||||
self._Screen._MsgBox.Draw()
|
self._Screen._MsgBox.Draw()
|
||||||
self._Screen.SwapAndShow()
|
self._Screen.SwapAndShow()
|
||||||
print("Run ",cur_li._Path)
|
if self._Emulator["FILETYPE"] == "dir":
|
||||||
|
path = cur_li._Path +"/"+self._Emulator["EXT"][0]
|
||||||
|
else:
|
||||||
|
path = cur_li._Path
|
||||||
|
|
||||||
|
print("Run ",path)
|
||||||
|
|
||||||
# check ROM_SO exists
|
# check ROM_SO exists
|
||||||
if FileExists(self._Emulator["ROM_SO"]):
|
if FileExists(self._Emulator["ROM_SO"]):
|
||||||
escaped_path = CmdClean( cur_li._Path)
|
escaped_path = CmdClean( path)
|
||||||
|
|
||||||
custom_config = ""
|
custom_config = ""
|
||||||
if self._Emulator["RETRO_CONFIG"] != "" and len(self._Emulator["RETRO_CONFIG"]) > 5:
|
if self._Emulator["RETRO_CONFIG"] != "" and len(self._Emulator["RETRO_CONFIG"]) > 5:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user