-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework the search algorithm for available scaled resolutions #7051
Conversation
2be61d5
to
e9b1bd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @oleg-derevenetz.
I left one comment. Could you check it when you have time.
Hi @oleg-derevenetz , my biggest fear not implementing this in the past is the amount of resolutions available for end users. Having tons of them seems like an overkill. The biggest problem is the way how we add resolutions in a case of having a single resolution returned by SDL. Logically we should add resolutions which are close to the aspect ratio of the original one. For instance, having 1920x1080 and adding 1280x960 doesn't look right for some people. I don't have a strong opinion about the best solution we should choose at the moment. |
Well, it's up to you :) But IMHO having more scaled resolutions is fine, because existing resolutions usually doesn't fit the scaling well.
This logic left intact in this PR (apart from incorrect optimization of resolution comparison which is reverted). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it works OK. 👍
On my cell phone I have only one scaled resolution (x1.5) as before this PR. On PC I have some new (x2.0) resolutions.
IMHO it will be better in future to set only the game resolution and have an option to use desktop resolution as screen resolution with scaling.
Talking about PC for me there is no difference - run the game in fullscreen using 640x480
or 640x480(x2.0)
- desktop resolution will be changed, all windows and icons will be rearranged. The only difference is that in first place there only will be used the video card or monitor built-in scaler. And running the game in a window I can always change the window size (i.e. maximize it) so (x1.0) and (x2.0) will give the same picture.
And, as I can see, on android the game always use native screen resolution and stretches the picture to fit it, keeping the aspect ratio. So there will be no difference between (x1.0) and other scales for the same resolution.
Technically there is no problem with this - all we need is to always use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Android (with max res of 1480x720) and PC(1920x1080) and it worked very well with the lower stretched resolutions. The Android phone had 986x480 (x1.5) reported.
@oleg-derevenetz , thank you so much for these improvements! |
Related to #7046
Use the reverse logic to search the available scaled resolutions: do not search for bigger resolutions for existing smaller ones (640x480 -> 1280x960) but add lower "pseudo-resolutions" for existing bigger resolutions instead (1280x1024 -> 640x512x2).