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
Reported in version: HG 2.1 Reported for operating system, platform: Windows 10, x86
Comments on the original bug report:
On 2019-06-17 21:04:10 +0000, Katelyn Gadd wrote:
Created attachment 3827
before (ideal resolution, on 150% dpi monitor)
If you enable the new 'permonitorv2' DPI awareness mode using an app manifest (app.manifest) in recent versions of Windows 10, SDL windows will grow infinitely on mousemove once they transition to a monitor with lower DPI. I'll attach two comparison screenshots.
I wasn't able to build a reduced repro yet, but from what I can tell the problem is that V2 scales non-client portions of the window and SDL appears to use integer pixels for non client and client size calculations. If the base windows DPI is say 150% (like my 4k monitor) and the window transitions to a 100% DPI window, the values are no longer integral pixel counts and as a result SDL produces rounding errors. When that happens every mouse move causes large vertical growth (because the titlebar is big) and slow horizontal growth. Moving back to the original monitor stops the growth but leaves the size incorrect.
Set component to events since it happens during mousemove event processing.
On 2019-06-17 21:04:28 +0000, Katelyn Gadd wrote:
Created attachment 3828
After a few mousemove events on the 100% dpi monitor
On 2019-06-17 21:44:17 +0000, Sam Lantinga wrote:
Do you have a patch to fix this that we can include in SDL 2.0.10?
Thanks!
On 2019-06-18 06:17:52 +0000, Katelyn Gadd wrote:
I honestly don't know SDL well enough to fix this. I could look into it some. Is there a particular SDL sample or testcase I should use to verify all the DPI-related stuff? I don't want to just end up fixing it for my scenario and breaking it for others.
The text was updated successfully, but these errors were encountered:
It looks like this has either been fixed in Windows or in SDL since this bug was reported. I'm testing on Windows 11 Version 10.0.22000 Build 22000, and I am not able to reproduce it.
If this is still active, please add a link to a project I can download and steps to repro.
The hint allows setting a specific DPI awareness ("unaware", "system", "permonitor", "permonitorv2").
This is the first part of High-DPI support on Windows ( libsdl-org#2119 ).
It doesn't implement a virtualized SDL coordinate system, which will be
addressed in a later commit. (This hint could be useful for SDL apps
that want 1 SDL unit = 1 pixel, though.)
Detecting and behaving correctly under per-monitor V2
(calling AdjustWindowRectExForDpi where needed) should fix the
following issues:
libsdl-org#3286libsdl-org#4712
The hint allows setting a specific DPI awareness ("unaware", "system", "permonitor", "permonitorv2").
This is the first part of High-DPI support on Windows ( #2119 ).
It doesn't implement a virtualized SDL coordinate system, which will be
addressed in a later commit. (This hint could be useful for SDL apps
that want 1 SDL unit = 1 pixel, though.)
Detecting and behaving correctly under per-monitor V2
(calling AdjustWindowRectExForDpi where needed) should fix the
following issues:
#3286#4712
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.1
Reported for operating system, platform: Windows 10, x86
Comments on the original bug report:
On 2019-06-17 21:04:10 +0000, Katelyn Gadd wrote:
On 2019-06-17 21:04:28 +0000, Katelyn Gadd wrote:
On 2019-06-17 21:44:17 +0000, Sam Lantinga wrote:
On 2019-06-18 06:17:52 +0000, Katelyn Gadd wrote:
The text was updated successfully, but these errors were encountered: