Draw translation overlays correctly within the content viewport#18986
Merged
LibretroAdmin merged 1 commit intolibretro:masterfrom Apr 28, 2026
Merged
Conversation
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.
Guidelines
C89_BUILD=1Description
I noticed that the AI service (image mode) translations were being drawn kind of strangely. The overlays were always being rendered full window dimensions. This caused incorrect placement when the game content viewport did not fill the full window, such as with a custom aspect ratio or with very wide/tall viewports (letterboxing).
This PR fixes those overlays by drawing them over the actual game/content viewport. The overlay drawing function now checks the current game video viewport and, when available, uses its x, y, width, and height. If viewport info is unavailable, it falls back to the previous full-output behavior.
Example of the behavior before (nightly 04-26-26) and after this change:
NVIDIA_Overlay_2026-04-28_03-18-33.mp4
Related Issues
should close both of these:
#15287
#12050
Related Pull Requests
none
Reviewers
[If possible @mention all the people that should review your pull request]