Repository navigation
Fix bezel aspect ratio when no game info is available - #17308
Open
Ravenforce wants to merge 1 commit into
Open
Ravenforce wants to merge 1 commit into
Ravenforce wants to merge 1 commit into
Conversation
Collaborator
|
looks ok but fails the ruff format checks - https://github.com/batocera-linux/batocera.linux/actions/runs/42508840269/job/128903965113?pr=17308 have your AI fix it ;-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using TheBezelProject decorations, the game viewport was incorrectly positioned and scaled within the bezel.
The issue was already present in Batocera 43.x and showed the same symptoms in Batocera 44.
During the initial work on Batocera 43.x, our investigation focused on resolving a separate controller-related issue. We subsequently moved directly to Batocera 44, where the bezel issue was investigated further.
Environment
Troubleshooting
The following settings and configurations were investigated:
Switching between OpenGL and Vulkan did not resolve the issue.
Root cause
The issue was traced to
write_bezel_config()inbatocera_launch_libretro/emulator.py.When
shader_bezelis false, the current implementation unconditionally selects thecustomaspect ratio.However, a custom aspect ratio is not always required.
Fix
The aspect ratio is now selected based on whether bezel adaptation is required:
customis used when bezel adaptation is necessary.coreis used when no bezel adaptation is necessary.This uses the core-provided aspect ratio when no bezel adaptation is required, while retaining the custom aspect ratio when adaptation is needed.
Testing
The change was tested on a Raspberry Pi 5 running Batocera 44 with TheBezelProject decorations.
The game viewport is now correctly centered and scaled within the bezel.
The fix remains effective after reverting previously modified graphics and scaling settings.
Related issues
Similar viewport positioning and scaling problems have previously been reported:
These reports describe related symptoms, although the underlying causes are not necessarily identical.
This change addresses the aspect-ratio selection in Batocera's bezel configuration generation.