Repository navigation
gfx: start EFB aspect fit enabled to match the default viewport policy - #312
Open
StilesCrisis wants to merge 1 commit into
Open
StilesCrisis wants to merge 1 commit into
StilesCrisis wants to merge 1 commit into
Conversation
GXState::viewportPolicy defaults to AURORA_VIEWPORT_FIT, but efb's g_aspectFit started out false. If your code never called AuroraSetViewportPolicy, GX would map viewports as FIT even though the framebuffer was sized to the window's aspect ratio. This meant that a 4:3 game in a widescreen window was stretched to fill it instead of being letterboxed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SjpWoYqNDKkH5Zpdbz3WaW
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.
GXState::viewportPolicy defaults to AURORA_VIEWPORT_FIT, but efb's g_aspectFit started out false.
If your code never called AuroraSetViewportPolicy, GX would map viewports as FIT even though the framebuffer was sized to the window’s aspect ratio. This meant that a 4:3 game in a widescreen window was stretched to fill it instead of being letterboxed.
This clearly isn't a huge bug—you can always set the policy—but the code is not self-consistent. g_gxState.viewportPolicy starts as AURORA_VIEWPORT_FIT, so assuming it behaves like FIT would be reasonable, but rendering behaves like STRETCH. It's surprising that you need to call
AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT)when that's the default value in code.