-
Notifications
You must be signed in to change notification settings - Fork 440
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|Glfw)Application: _commandLineDpiScalingPolicy always default, app-defined scaling never takes effect #416
Comments
I made a tiny edit in Magnum/Platform/Implementation/DpiScaling.cpp
to args.addOption("dpi-scaling") taking out the default option, because that seems to be what the first branch was made to parse and it does what i would expect it to do |
this is also because the glfw dpi detection always uses monitor dpi instead of |
Re Re the other thing -- yep there's definitely something fishy. I'll check what SDL does also, I remember at least one of the two had it working correctly at some point. |
thank you! |
If there is no
--magnum-dpi-scaling
specified on the command line, dpi-scaling is set to"default"
Which according to this code, which is run by every ctor of GlfwApplication:
magnum/src/Magnum/Platform/GlfwApplication.cpp
Lines 91 to 108 in 7cfa170
_commandLineDpiScalingPolicy
is set here and only here toGlfwDpiScalingPolicy::Default
, which is just an alias to the platform-dependant default policy.Crucially
GlfwDpiScalingPolicy::Default
is not0
so... when this code comes along:
magnum/src/Magnum/Platform/GlfwApplication.cpp
Lines 137 to 150 in 7cfa170
and checks
if(UnsignedByte(_commandLineDpiScalingPolicy))
The other 2 cases are not possible!
The text was updated successfully, but these errors were encountered: