Centering viewport with RetroArch 1.20

I don’t know the exact version but I installed RA like one year ago and I was defining centered viewports with the following settings:

video_fullscreen_x = 1920
video_fullscreen_y = 1080
video_aspect_ratio_auto = false
custom_viewport_width = "1280"
custom_viewport_height = "960"
custom_viewport_x = "320"
custom_viewport_y = "60"

Now, with RetroArch 1.20, the viewport size is correct, but it appears aligned to the top-right of the screen. Am I missing anything or is it a regression?

Regards and many thanks in advance.

there’s now an “anchoring” setting that might be altering behavior.

1 Like

Many thanks, @hunterk. I think the options are:

video_viewport_bias_x = "0.5"
video_viewport_bias_y = "0.5"

The default value is 0.5 but I don’t fully understand how they work, or there is a bug associated with them. My guess is they represent the anchor point for the background (full screen), and the viewport. So, in theory, the following configuration should center the viewport:

custom_viewport_width = "1280"
custom_viewport_height = "960"
video_viewport_bias_x = "0.5"
video_viewport_bias_y = "0.5"
custom_viewport_x = "0"
custom_viewport_y = "0"

Instead there is a vertical offset as you can see in the screenshot below:

Sorry for the bump. Can anybody confirm whether this is a bug?

Have you tried turning Integer Scale On? It should automatically center with it on.

Trying later, thanks for the sugestion, but I’d say that’s not necesarily the “right” thing to do or at least the only use case for the viewport “clamping”. Think for example SNES or MS-DOS games, you may want to accept the source aspect ratio, but you can also force it to 4:3.

EDIT: Before my config was like:

# Only scales video in integer steps.
# The base size depends on system-reported geometry and aspect ratio.
# If video_force_aspect is not set, X/Y will be integer scaled independently.
video_scale_integer = 4

# Index of the aspect ratio selection in the menu.
# 20 = Config, 21 = 1:1 PAR, 22 = Core Provided, 23 = Custom Viewport 
aspect_ratio_index = 23

I chaged to:

aspect_ratio_index = 20

Although the screen appears centered now (and it shouldn’t since I also have a 120px vertical bias --needed to have my screen centered with aspect_ratio_index = 23), It’s using the full height of the monitor, which I don’t want.