On platforms with resolution changes (e.g. Switch), absolute font-sizes cause problems
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
I like to have the RetroArch FPS notification widget enabled at all times, to cross-check games' performance between cores. Ideally, the widget's text should be large enough to be legible, but also small enough to stay out of the way of the game content. It's easy to customize the RetroArch Notification display settings to get the appearance I'm looking for.
On most platforms/devices, since there's just one static display with one static resolution, this is a one-and-done operation (as long as RetroArch is consistently used full-screen.)
But on the Switch, which changes display resolutions frequently (when docking/undocking), this customization is not one-and-done.
Expected behavior
I expect RetroArch to scale the notification widget elements relative to the display resolution, such that they take up the same percentage of the display under 1080p/docked as they do under 720p/undocked. As the game content itself is scaled relative to the viewport, I expect the notification widgets to retain the same size relative to the game content as the viewport is scaled.
VLC is a good example of a program with the "expected behavior": it displays overlaid notification text relative to the size of the viewport, such that the text (e.g. subtitles) on a video stays the same size relative to the video it's overlaying, regardless of resizing the window, changing display resolution, etc.
Actual behavior
The Notification display settings that look good under 1080p/docked produce widgets that are far too large under 720p/undocked, with the FPS-counter widget covering up important gameplay information; and likewise, the display settings that work well for readability under 720p/undocked, become illegibly tiny under 1080p/docked.
Notification display settings under 1080p/docked that produce widget text smaller than in-game text, become much larger than in-game text under 720p/undocked, rather than keeping parity with it.
Steps to reproduce the bug
- Set up aesthetically-pleasing Notification display settings on RetroArch with Switch docked
- Undock device
- Start a game
Version/Commit and Environment information
- RetroArch: Git commit 532fd88
- OS: Nintendo Switch HorizonOS 9.1.0
Proposed Fix
Change the Notification font sizes to be specified as a percentage of viewport height (or in CSS-like vh units), rather than as an absolute pt value. Migrate current configurations on update by applying a pt-to-vh conversion formula.
Perhaps add an additional config setting (e.g. "Notification font-size unit" or "Notification font scaling"), to choose between viewport-relative and absolute units. Some people who use RetroArch windowed likely expect resizing the window to not scale the notification elements, but rather just slide them around; and they could keep this behavior by choosing absolute units. (But most people would, I believe, prefer viewport-relative scaling; so migrating them by default and then letting them explicitly opt out later makes the most sense, I think.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the notification widget font-size handling and how viewport resolution changes are processed on Switch, then compare docked and undocked rendering. Done means notification text and other widget elements retain the same size relative to the game content across 1080p and 720p.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100