-
Notifications
You must be signed in to change notification settings - Fork 162
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
SDL Regression - Wrong Fullscreen Resolution Chosen at High DPI #2699
Comments
@BreakPoints Let me know if this works better #2713 as for ImGUI being blurry, I think that is expected as you have to do a bunch of other work to get that right, and it's probably not worth it since it's just for debugging - https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-should-i-handle-dpi-in-my-application But I was able to reproduce the imgui bar not spanning the entire width, as well as the resolution clearly being wrong when you attempt to minimize the game (indication that the fullscreen window size was too small (25% scaled down for example)). Both of those are now fixed on my end. |
Tried #2713 and it's an improvement, the Windows Desktop is now kept at native resolution. The ImGUI being blurry is still being caused by the same issue as the rest of the game. On your PR the framebuffer of the game + ImGUI is being chosen based off of Windows scaling so on my 2560x1600 screen with 200% scaling I get a sharp 800p integer scaled image. With 150% scale we are now at an uneven scale so bilinear scaling is used from 1200p and that's when the whole image looks blurry. In game resolution is scaled to this incorrect intermediate resolution, then scaled again to the desktop resolution Windows is running in. Same in fullscreen and borderless modes. Windowed mode allows Windows scaling to scale up whatever game resolution is chosen, any resolution over 800p at 200% scaling is progressively more offscreen. |
Can you post screenshots? So the problem is easier to visualize. |
I really have no idea how this stuff is supposed to be handled properly and I couldn't find a consistent reference for how it's supposed to be done either. In my linked PR I reference some SDL hints related to windows DPI awareness that may help (some solutions referenced these, I saw absolutely no difference using them). I'll leave this to someone who has more of a clue than me. I can also reproduce snipping tools problems / sometimes the borderless window doesn't want to minimize as gracefully as it should -- but I believe this is unrelated to scaling and is a separate issue. For what it's worth -- I can replicate these same problems on the old GLFW code if i change the scaling while the game is running. |
I think it would be a flag that needs to be set that tells Windows that the application handles scaling itself. Forcing it in the compatibility settings results in native resolutions while scaling is enabled in Windows: I'll have a dig but at least with #2713 and the above setting the issue can be worked around. |
Just wondering - is this with MSAA on? Does this act differently with MSAA off in windowed mode? |
This is all with MSAA off, windowed mode just increases the size of the windows by the display scaling percentage still leading to blurry images. The reason the 200% imagine looks like it's got MSAA on is because it's rendering at 1600p internally then being scaled to 800p (effectively super sampling), then back to 1600p using nearest neighbour |
Acknowledgements
Describe the Bug
Since the SDL changes, swapping to fullscreen mode with a non 100% scale set in Windows results in the wrong resolution being chosen.
From what I can see the desktop is forced into 100% scaling and a set resolution when fullscreening but if scaling was not set to 100% before swapping modes an incorrect desktop resolution is set. This means running at native resolution from the games settings still looks blurry.
Notes: Different scaling levels in Windows will lead to different incorrect desktop resolutions set, 2560x1600 125% ends up in a 4:3 resolution.
How To Reproduce
Does this problem occur on original hardware or PCSX2?
Not needed, bug is obvious
Expected Behavior
Native display resolution is selected for fullscreen
Operating System
Windows 11 22H2
OpenGOAL Version
dev
Game Version
NTSC 1.0 (black label)
Are you using a high refresh-rate monitor (>60Hz)
No
The text was updated successfully, but these errors were encountered: