You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 2.0.5 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2016-12-14 22:05:37 +0000, James Le Cuirot wrote:
Alien Isolation has very bad aliasing and none of the game's built-in anti-aliasing methods are very effective. This is even a problem on Windows but at least those users have the option of using a mod that adds TXAA. Sadly it's very Windows/D3D specific. The best available option to Linux users is to render at a higher resolution and downscale. The game does not allow this natively so you need to use xrandr's --scale-from option. I have come here after filing a freedesktop.org bug and then realising the issue is with SDL.
I am using --scale-from like so to downscale from 4K to 1080p. You get very odd results without the --panning option but this is arguably an xrandr bug.
SDL initially gets the correct CRTC size in X11_InitModes_XRandR directly from the XRRCrtcInfo with crtc->width and crtc->height. The problem is that it then throws these away of favour of values associated with the current mode in SetXRandRModeInfo. The result is games like Alien Isolation and SuperTux being rendered in the bottom-left quarter of the screen.
If I simply comment out the call to SetXRandRModeInfo then both games work fine. Neither offer this size in the options but both render at 3840x2160 while in fullscreen anyway. I initially tested Neverball but this is a bad example as it has a hardcoded list of modes.
SetXRandRModeInfo's main purpose in this context seems to be to deal with rotation and yet I get the exact same result with it commented out when I apply rotation. I had hoped to try --rotate and --scale-from at the same time but I could not get these to play well together.
I know that SetXRandRModeInfo cannot simply be removed and the rotation handling is still needed as it also used to get information about other modes in X11_GetDisplayModes. It is additionally used to fetch the refresh rate, which isn't used by the library, but may be used by games.
I think that X11_InitModes_XRandR should only consider the values reported by crtc->width and crtc->height but not check for rotation. It should still fetch the refresh rate.
X11_GetDisplayModes should continue to work as it does now except that it could add a mode for crtc->width and crtc->height if this size is found not to match any of the modes listed by XRRGetScreenResources. This will allow the size to appear in option screens. The games I tried work anyway but other games may forcefully restrict themselves to this mode list.
On a side note, switching mode in a game while rotated gives weird results but this is due to the aforementioned --panning bug in xrandr.
What do you think? I could whip up a patch for this.
On 2016-12-14 22:15:17 +0000, James Le Cuirot wrote:
I see that I overlooked this line in SetXRandRModeInfo:
Obviously this is critically important so I'll take that into account too. :) When adding the larger size (e.g. 4K) then this would actually be the modeID for the smaller size (e.g. 1080p).
The text was updated successfully, but these errors were encountered:
Heh, I finally completed this game just this year, but by that time, I had a 1440p screen. I'm also using Wayland now. I don't really want to poke at this without any need to, so I'll let someone else tackle it if they want.
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 2.0.5
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2016-12-14 22:05:37 +0000, James Le Cuirot wrote:
On 2016-12-14 22:15:17 +0000, James Le Cuirot wrote:
The text was updated successfully, but these errors were encountered: