From 7b14cfddac7533a02993e34bed54beda75741057 Mon Sep 17 00:00:00 2001 From: acmeplus Date: Wed, 4 Dec 2024 01:55:28 +0000 Subject: [PATCH] Fixed libretroConfig.py for rg28xx screen rotation --- .../configgen/generators/libretro/libretroConfig.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py b/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py index f6c299c6f7..a9129ed201 100644 --- a/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py +++ b/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py @@ -211,8 +211,13 @@ def createLibretroConfig(generator: Generator, system: Emulator, controllers: Co retroarchConfig['vrr_runloop_enable'] = 'false' # required at least for vulkan (to get the correct resolution) - retroarchConfig['video_fullscreen_x'] = gameResolution["width"] - retroarchConfig['video_fullscreen_y'] = gameResolution["height"] + # For rotated screens like the rg28xx + if gameResolution["width"] < gameResolution["height"]: + retroarchConfig['video_fullscreen_x'] = gameResolution["height"] + retroarchConfig['video_fullscreen_y'] = gameResolution["width"] + else: + retroarchConfig['video_fullscreen_x'] = gameResolution["width"] + retroarchConfig['video_fullscreen_y'] = gameResolution["height"] retroarchConfig['video_black_frame_insertion'] = 'false' # don't use anymore this value while it doesn't allow the shaders to work retroarchConfig['pause_nonactive'] = 'false' # required at least on x86 x86_64 otherwise, the game is paused at launch