Repository navigation
[Feature] Add aspect ratio selector for non-widescreen monitors - #339
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Aspect configuration and graphics settings runtime/include/runtime_config.h, runtime/include/aurora_events.h, runtime/src/settings_overlay.cpp, runtime/tests/runtime_config_tests.cpp |
Configuration reads force_aspect and falls back to force_16_9 when the new key is absent. The graphics settings provide a 16:9 or 4:3 selector and a separate force-aspect control. Tests cover legacy-key parsing. |
Reference-based aspect calculations runtime/src/hle/gx/gx_dynamic_aspect.h, runtime/src/dynamic_aspect.cpp |
Aspect calculations accept a reference aspect. Egg screen records use the selected reference aspect to calculate widths and vertical expansion. |
Dynamic policy and runtime integration runtime/src/dynamic_aspect.cpp, runtime/src/main.cpp, runtime/src/hle/sc.cpp |
Runtime setup migrates the legacy setting and passes the force-aspect value to dynamic aspect configuration. Dynamic aspect handling applies forced 4:3 or 16:9 policy. The HLE aspect query reflects the widescreen setting. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant RuntimeMain
participant DynamicAspect
participant ViewportAndVI
RuntimeMain->>DynamicAspect: Configure widescreen and force-aspect values
DynamicAspect->>ViewportAndVI: Apply viewport and VI policy
Suggested reviewers: patchzyy
Merge Risk: 
Minimal · up to e4434
-
No issue identified here prevents merging the aspect-ratio selector after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
This pr seems unneeded [video] And your game will launch in 4:3 mode + will widen up for 5:4 monitors |
|
I would much rather have the 4:3 option to also dynamically scale similarly to the 16:9 option, would be significanly less code, and also less options for the users which would be better in this case to make playing the game easier, having an aspect ratio selector would be useless if the game auto-scales to any resolution anyways |
|
This is exactly what this PR is about. Unless something is wrong with my config, the current implementation only dynamically scale when widescreen is ON. When playing in 4:3 the game doesn't dynamically scale to the window's size. My implementation allows the screen to fit the window regardless of the aspect ratio (exactly what you're asking) with an easy way to switch between 16:9 and 4:3. When widescreen is on (but playing on a 5:4 monitor) the viewport does expand vertically, but the UI can be a bit tiny (on top of looking a bit odd). About my messy code, I tried making other changes (like making the game switch aspect ratio on the fly) and failed, but the fondations are here for people who want to try implementing features on top of it. When I'll get home I will take a few screenshots to demonstrate what I mean. |




Currently, the game doesn’t display properly on 4:3 or 5:4 monitors, since it is always rendered at 16:9.
This PR adds an aspect ratio selector to the F10 menu, which is applied on the next launch.
I also renamed the
force_16_9option toforce_aspect, since it now forces the currently selected aspect ratio rather than 16:9.Feedback is more than welcome!
Summary by CodeRabbit