diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index e57b9651cf098747901fec4cf916b295f8fe821f..3f8ed87a5fa42040a1ea25b0b8f82534745267f5 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -45,6 +45,7 @@ as release notes for end user on a Recalbox upgrade. - Fix hidden and/or empty being shown after some user operations - Fix user selected ratio per game - Fix Supermodel config and configgen files (Thanks AxelR !) +- Fix user overlays prevents games from working on 4/3 screen (for handled cases with dock) ### Bumps - Bump retroarch to 1.19.1 diff --git a/projects/configgen/configgen/generators/libretro/libretroGenerator.py b/projects/configgen/configgen/generators/libretro/libretroGenerator.py index 017675767b78a45a72efcbfed23c0c7df2397922..46b3779db434415e318ded912c903a0bb65beb66 100644 --- a/projects/configgen/configgen/generators/libretro/libretroGenerator.py +++ b/projects/configgen/configgen/generators/libretro/libretroGenerator.py @@ -68,37 +68,38 @@ class LibretroGenerator(Generator): # Overlays are applied only when we are not in wide core else: # User overlays - overlayFile = "{}/{}/.overlay.cfg".format(recalboxFiles.OVERLAYS, system.Name) - if os.path.isfile(overlayFile): - # System global configuration - configs.append(overlayFile) - else: - overlayFile = "{}/.overlay.cfg".format(recalboxFiles.OVERLAYS) - if os.path.isfile(overlayFile): - # All system global configuration - configs.append(overlayFile) - overlayFile = "{}/{}/{}.cfg".format(recalboxFiles.OVERLAYS, system.Name, romName) - if os.path.isfile(overlayFile): - # Rom file overlay - configs.append(overlayFile) - else: - overlayFile = "{}/{}/{}.cfg".format(recalboxFiles.OVERLAYS, system.Name, system.Name) - if os.path.isfile(overlayFile): - # System overlay - configs.append(overlayFile) - # No config applied - if len(configs) == 0: - # The recalbox overlays should be added only if - # global.recalboxoverlays=1 or system.recalboxoverlays activated - if system.RecalboxOverlays: - # ratio = we can activate when ratio is not 16/9 and 16/10 - if system.Ratio not in ["16/9", "16/10"]: - # screen resolution that can support overlays are over 1.5 ratio (as it is float > 1.51) - from configgen.utils.resolutions import ResolutionParser - resolution = ResolutionParser(system.VideoMode) - if resolution.ratio() > 1.51: - defaultOverlayFile = "{}/{}/{}.cfg".format(recalboxFiles.RECALBOX_OVERLAYS, system.Name, - system.Name) + + # ratio = we can activate when ratio is not 16/9 and 16/10 + if system.Ratio not in ["16/9", "16/10"]: + # screen resolution that can support overlays are over 1.5 ratio (as it is float > 1.51) + from configgen.utils.resolutions import ResolutionParser + resolution = ResolutionParser(system.VideoMode) + if resolution.ratio() > 1.51: + # User overlays + overlayFile = "{}/{}/.overlay.cfg".format(recalboxFiles.OVERLAYS, system.Name) + if os.path.isfile(overlayFile): + # System global configuration + configs.append(overlayFile) + else: + overlayFile = "{}/.overlay.cfg".format(recalboxFiles.OVERLAYS) + if os.path.isfile(overlayFile): + # All system global configuration + configs.append(overlayFile) + overlayFile = "{}/{}/{}.cfg".format(recalboxFiles.OVERLAYS, system.Name, romName) + if os.path.isfile(overlayFile): + # Rom file overlay + configs.append(overlayFile) + else: + overlayFile = "{}/{}/{}.cfg".format(recalboxFiles.OVERLAYS, system.Name, system.Name) + if os.path.isfile(overlayFile): + # System overlay + configs.append(overlayFile) + # No config applied + if len(configs) == 0: + # The recalbox overlays should be added only if + # global.recalboxoverlays=1 or system.recalboxoverlays activated + if system.RecalboxOverlays: + defaultOverlayFile = "{}/{}/{}.cfg".format(recalboxFiles.RECALBOX_OVERLAYS, system.Name, system.Name) if os.path.isfile(defaultOverlayFile): configs.append(defaultOverlayFile)