Game screen appears in incorrect position using GL or GLCore with Aspect Ratio: Custom

Open
#18,036 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start by tracing the gl and glcore video paths that apply Aspect Ratio: Custom and Viewport Anchor Bias Y during gameplay, then compare them with the one-frame update seen while the RetroArch GUI is open. Reproduce on the stated Raspberry Pi 5 setup at 1920x1080 with lr-fbneo; done means Bias Y remains consistently positioned during gameplay for both drivers.

Written by the indexing model from the issue text.

Description

Is there an existing issue for this?
  • This is a bug in RetroArch frontend
  • I have searched the existing issues
Description

Using gl or glcore and with Aspect Ratio = Custom, Viewport Anchor Bias Y appears in the incorrect position for the duration of gameplay.
Here is a video demonstrating the issue with voiceover.

In the video example, the game natively runs at 320x480 and is running with lr-fbneo with RetroArch v1.21.0. I've confirmed core & shader do not contribute to or resolve the problem.

Bias X appears correctly, but Bias Y appears to be shifted vertically during gameplay. A value of 1.00 seems to act as 0.00 when this issue occurs. During gameplay, when entering the RetroArch menu and changing Viewport Anchor Bias Y, you will see the image move as expected, but only for a single frame does it appear in the correct position before snapping to the incorrect position.

This issue was discovered when testing dozens of games and systems with custom overlays, and noted those with gl were dramatically, vertically shifted.

Expected behavior

Viewport Anchor Bias Y should consistently place the screen in the correct vertical position regardless of video driver and aspect ratio setting.

Steps to reproduce the bug

For a 100% reproducible example:

  1. Tested on a Raspberry Pi5 / Bookworm
  2. Tested at 1080P resolution (1920x1080)
  3. Ensure Video | Output | Video is set to either gl or glcore
  4. Ensure Video | Scaling | Aspect Ratio: Custom
  5. Launch lr-fbneo with any game
  6. Observe vertical position of game window is incorrect
  7. Enter RetroArch GUI
  8. Manually adjust Video | Scaling | Viewport Anchor Bias Y and observe game behind GUI
    Results: You should see the game "pop" for 1 frame into the correct position, but then return to an incorrect position
Version/Commit

1.20.0 to 1.21.0 (current)

Bisect Results

1.19.0

Present in the nightly version

I don't know

Platform & operating system

Linux aarch64

Affected Cores

All

Environment information

System Information

  • Device: Raspberry Pi5
  • OS: Bookworm
  • uname -a: Linux ssd 6.12.25+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux)
  • Core: Doesn't matter (uses lr-fbneo in this case, but issue happens with lr-mame and other cores)
  • Video Core: gl or glcore
  • RetroArch Version: Issue started with 1.20.0 when the Viewport Anchor Bias* tech was added and still occurs with 1.21.0.
Relevant log output
Nothing noteworthy in log
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libretro/RetroArch

All issues in libretro/RetroArch

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.