Skip to content

rgui: add 1:1 (square) menu aspect ratio for square displays#19170

Open
GavriloviciEduard wants to merge 1 commit into
libretro:masterfrom
GavriloviciEduard:rgui-square-aspect-ratio
Open

rgui: add 1:1 (square) menu aspect ratio for square displays#19170
GavriloviciEduard wants to merge 1 commit into
libretro:masterfrom
GavriloviciEduard:rgui-square-aspect-ratio

Conversation

@GavriloviciEduard

@GavriloviciEduard GavriloviciEduard commented Jul 6, 2026

Copy link
Copy Markdown

Description

Existing rgui menu aspect ratios either letterbox (wasted screen) or stretch (distortion) on square displays such as 720×720 handhelds (e.g. the Anbernic RG Rotate). This adds a native 1:1 option to the menu aspect ratio setting that renders a square framebuffer and integer-scales cleanly to fill the panel (240×240 → 3× → 720×720).

The new value is appended after AUTO in enum rgui_aspect_ratio, so it takes the next free index and existing configs / saved rgui_aspect_ratio values are unaffected. The setting range auto-extends via RGUI_ASPECT_RATIO_LAST - 1, so no range edit is needed.

Testing: builds clean on desktop and on-device (arm64 Android debug build). Verified on a 720×720 panel, screenshots below (4:3 letterboxed vs 4:3 stretched vs 1:1).

4:3 (letterboxed) 4:3 (stretched) 1:1 (this PR)

Existing menu aspect ratios either letterbox (wasted space) or stretch
(distortion) on square displays such as 720x720 handhelds. Add a native
1:1 option that renders a square framebuffer and integer-scales cleanly
to fill the panel. Appended after AUTO, so existing configs are unaffected.
@metchebe

metchebe commented Jul 9, 2026

Copy link
Copy Markdown

Hi @GavriloviciEduard

I did this also for a test a while ago for my RGB30, I ended up not using it however.

My old patch also edits these files, I remember that something was off without adding a case RGUI_ASPECT_RATIO_1_1 to these:
cores/dynamic_dummy.c
gfx/drivers/gx_gfx.c

Did you look into these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants