diff --git a/sys.py/UI/Emulator/rom_list_page.py b/sys.py/UI/Emulator/rom_list_page.py index 18614f2..4bdf2bd 100644 --- a/sys.py/UI/Emulator/rom_list_page.py +++ b/sys.py/UI/Emulator/rom_list_page.py @@ -154,8 +154,8 @@ class RomListPage(Page): bname = os.path.basename(v) ### filter extension if len(bname)> 1: is_excluded = False - for exclude_pattern in self._Emulator["EXCLUDE"]: - if re.match(exclude_pattern, bname): + for exclude_ext in self._Emulator["EXCLUDE"]:## only compares filename endswith ext in EXCLUDE,splited by , + if len(exclude_ext) > 1 and bname.endswith(exclude_ext): is_excluded = True break diff --git a/sys.py/UI/main_screen.py b/sys.py/UI/main_screen.py index ca8e576..52b6d01 100644 --- a/sys.py/UI/main_screen.py +++ b/sys.py/UI/main_screen.py @@ -406,6 +406,27 @@ class MainScreen(object): tmp.append(tup) tmp = sorted(tmp, key=itemgetter(0)) + + retro_games_idx = [] + for i,x in enumerate(tmp): + if "20_Retro Games" in x[0]: + retro_games_idx.append(x[1]) + + if len(retro_games_idx) > 1: + for i in range(1,len(retro_games_idx)): + p._Icons[retro_games_idx[0]]._LinkPage._Icons.extend( p._Icons[retro_games_idx[i]]._LinkPage._Icons) + #p._Icons[ retro_games_idx[0]]._LinkPage._Icons.extend( tmp[ retro_games_idx[i] ]._LinkPage._Icons ) + + + tmp_swap = [] + for i, x in enumerate(tmp): + if "20_Retro Games" not in x[0]: + tmp_swap.append(x) + if "20_Retro Games" in x[0] and i == retro_games_idx[0]: + tmp_swap.append(x) + + tmp = tmp_swap + #print(tmp) new_icons = [] for x in tmp: diff --git a/sys.py/UI/util_funcs.py b/sys.py/UI/util_funcs.py index 34d5cc9..68262bf 100644 --- a/sys.py/UI/util_funcs.py +++ b/sys.py/UI/util_funcs.py @@ -16,6 +16,10 @@ import config def SkinMap(orig_file_or_dir): DefaultSkin = "default" + #doing a wrapper for items under /home/cpi/apps/Menu/*, to be like Menu/GameShell/* + if orig_file_or_dir.startswith("/home/cpi/apps/Menu"): + orig_file_or_dir = orig_file_or_dir.replace("/home/cpi/apps/Menu/","../Menu/GameShell/") + if orig_file_or_dir.startswith(".."): ret = orig_file_or_dir.replace("..","../skin/"+config.SKIN) if FileExists(ret) == False: @@ -24,7 +28,7 @@ def SkinMap(orig_file_or_dir): ret = "../skin/"+config.SKIN+"/sys.py/"+orig_file_or_dir if FileExists(ret) == False: ret = "../skin/"+DefaultSkin+"/sys.py/"+orig_file_or_dir - + if FileExists( ret ): return ret else: ## if not existed both in default or custom skin ,return where it is