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
Qt/RenderWidget: Account for devicePixelRatio when auto-adjusting window size #8366
Conversation
Do we handle moving the window between screens anywhere? If so, that place needs to be updated as well (assuming we declare PerMonitorDPI in our manifest) |
There doesn't appear to be anything handling movement between screens. Qt doesn't provide an elegant way to do it either ( |
Tested! So this fixes it on the primary display, 1:1 exactly as it should be! However, if I move the window to another display or even open dolphin on another display, the ui is always scaled based on the primary display. So my primary display is 200% scaling, but my side monitors are 150% scaling. On the primary monitor 2x native is correctly set to 1280 pixels wide, but on the secondary displays, it is incorrectly 960 pixels wide. No matter what I did, changing multiple resolutions to auto-adjust multiple times, moving the render window between displays, or opening Dolphin on those screens, it was always 960 pixels wide. Well, it's still an improvement, but, hmm. |
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.
See my comment above. Merging it as is would break building with CMake on Windows.
a576c68
to
bbb35e1
Compare
bbb35e1
to
3006c73
Compare
Pinging @MayImilae to check the behavior of this PR again, since it's now using a different function to get the |
We've verified that per-monitor DPI works now, so this should be good to merge! We noticed some other odd bugs in testing but they aren't in any way related to this PR, and also occur on master. |
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.
Good to go now as far as I am concerned.
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.
LGTM.
We want the game displayed at its actual resolution, not a scaled resolution. Fixes https://bugs.dolphin-emu.org/issues/11861