Skip to content
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

bug: scale factor not correct on Windows #8

Closed
jolexxa opened this issue Feb 3, 2025 · 0 comments · Fixed by #7
Closed

bug: scale factor not correct on Windows #8

jolexxa opened this issue Feb 3, 2025 · 0 comments · Fixed by #7
Labels
bug Something isn't working

Comments

@jolexxa
Copy link
Member

jolexxa commented Feb 3, 2025

Godot does not have per-monitor DPI awareness (see godotengine/godot#56341), so we are not actually quite computing the scale factor correctly. I can prove this by connecting a primary 4K display at 150% and an HD screen at 100%. Godot reports the HD screen's dimensions incorrectly, scaled by 1.5 since the primary monitor is at 150%.

I am preparing a fix by determining the monitor's true native resolution (through some GDI32 functions, of all things -- the only way to get it reliably without per-monitor DPI awareness, it seems). This fix is in #7 but will need some more cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant