Skip to content

Commit

Permalink
Added refresh roms message for RetroDECK.
Browse files Browse the repository at this point in the history
  • Loading branch information
kloptops committed Dec 9, 2024
1 parent 7aacdf4 commit c3d61c9
Show file tree
Hide file tree
Showing 15 changed files with 4,182 additions and 4,047 deletions.
9 changes: 6 additions & 3 deletions PortMaster/pugwash
Original file line number Diff line number Diff line change
Expand Up @@ -2050,10 +2050,13 @@ def main(argv):
if pm.hm is not None and pm.hm.platform.ES_NAME is not None:
logger.debug(f"{pm.hm.platform.ports_changed()}")
if pm.hm.platform.ports_changed():
refresh_file = (pm.hm.tools_dir / "PortMaster" / f".{pm.hm.platform.ES_NAME}-refresh")
logger.debug(f"{refresh_file}")
if pm.hm.platform.ES_NAME == 'show-refresh':
pm.message_box(_("Ports have been added or removed, update your games list to see the new games or remove the uninstalled ones." + pm.hm.platform.ROMS_REFRESH_TEXT))
else:
refresh_file = (pm.hm.tools_dir / "PortMaster" / f".{pm.hm.platform.ES_NAME}-refresh")
logger.debug(f"{refresh_file}")

refresh_file.touch(0o644, exist_ok=True)
refresh_file.touch(0o644, exist_ok=True)

# if harbourmaster.HM_TESTING:
# for key, value in pm.text_data.items():
Expand Down
4 changes: 3 additions & 1 deletion PortMaster/pylibs/harbourmaster/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class PlatformBase():
MOVE_PM_BASH = False
MOVE_PM_BASH_DIR = None
ES_NAME = None
ROMS_REFRESH_TEXT = ""

XML_ELEMENT_MAP = {
'path': 'path',
Expand Down Expand Up @@ -461,8 +462,9 @@ def gamelist_file(self):

class PlatformRetroDECK(PlatformBase):
MOVE_PM_BASH = False
ES_NAME = 'es-de'
ES_NAME = 'show-refresh'
RD_CONFIG = None
ROMS_REFRESH_TEXT = _("\n\nIn order to do so:\nMENU -> UTILITIES -> Rescan Rom Directory")

XML_ELEMENT_MAP = {
'path': 'path',
Expand Down
Loading

0 comments on commit c3d61c9

Please sign in to comment.