Open vaguerant opened 4 years ago
this is a very basic function that every tv has, so why is this feature isn't available on retroarch yet, earliest mention about this is from 2016, that is way beyond unresponsive for a simple scaling option. 2020?, hello?. pan scan for 2020!.
Ah yes, this would probably help an issue I have which is the fact that using the aspect ratio options available will always just stretch to the screen, when in fact I often find myself wishing I could resize the image to anything else but with the aspect ratio still applied. I also don't like how viewport works so much. If you center it manually, which could take a while, it will erase it once you select an aspect ratio or integer option, and doesn't let you change it either because it will be forced centered. I sometimes would like to be able to move it while also using an integer or aspect ratio option. There should be a button that turns on and off for automatic centering / custom viewport.
Was about to post some similar feature request when I found this. My suggestion is slightly different though: It could have a setting called "Integer Scaling Overscan" with the three following methods:
To illustrate: let's imagine a core provided 256x224 content and a 1080p display.
No Overscan: Integer Scaling *4 = 1024x896 (~17% vertical screen real estate lost)
Force Overscan Integer Scaling *5 = 1280x1120 (3% overscan)
Allow Overscan Integer Scaling *5 (prefers 3% overscan over 17% screen real estate loss because 3 is lower than 17)
The reason why I think it's a better approach is because you can just set it and forget it, and it would apply to pretty much any content and any display resolution. This goes hand in hand with Retroarch's philosophy of supporting all kinds of devices and platforms.
I personally use the same retroarch build on both my 1080p monitor and my 4k TV depending on availability. Using arbitrary pixel numbers on scaling settings just breaks everything when switching from one display to the other. I just set it to integer scaling, core provided and accept the screen loss, which is the only "set it and forget" option right now if you want even pixels.
Description
This is somewhat similar to #4158 in concept but I believe distinct as it relates explicitly to the viewport and integer scales rather than to arbitrary zooming on the image.
Certain platforms don't have ideal integer scaling resolutions to suit all displays. One example is the NTSC Sega Genesis/Mega Drive, which displays 224 lines of usable signal. On a 1080p screen, the Integer Scale option will scale this to 896 (4x), leaving a huge 184 unused lines, or 17% of the display's total height. Switching over to a custom aspect ratio and adjusting manually, it's possible to scale to 1120 (5x), losing 40 lines (3% of the total viewport height, or just 8 Mega Drive scanlines) off the top and bottom of the screen.
Using a custom aspect ratio does not adequately resolve this issue because cores like Genesis Plus GX cover multiple platforms, each with different resolutions and aspect ratios. I suppose you could work around these limitations using content directory overrides, but that seems like a fairly complicated and fiddly solution that requires overrides for every system you want to use this feature on.
Expected behavior
I'd like to see an option to set a maximal resolution for integer scaling, distinct from the actual screen resolution. e.g., a user with a 1920*1080 display might set things up as follows:
Now, integer scaling will use the nearest integer scale that fits into that range, and since 224*5 is 1120, you'll get a centered 5x integer scale on the vertical.
(Note: I do imagine "maximum width" would be almost completely useless most of the time, since users are far more likely to be constrained on the vertical, simply because there aren't many older games with widescreen aspect ratios, but there are occasional cases where it would still be nice to have.)
This feature could be hidden behind the Advanced Options toggle to avoid cluttering the Video configuration tab if desired.
Actual behavior
With integer scaling enabled (and without using a custom aspect ratio), RetroArch currently rounds down to the nearest integer scale that fits into the screen's resolution, with no option to round up in edge cases where that might be more desirable, sometimes resulting in a heavily windowboxed image.