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

Make DPI code link dynamically #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoelLinn
Copy link
Contributor

Support older Windows Versions

I am unable to fully test this code as I lack the hardware.

I however think this code is still (functionally) broken tbh. GLFW is imho supposed to handle these APIs (they dynload these functions themselves on init). If I'm correct they also specify to support multiple monitors with different DPI (what happens on moving a window? Do we need to change the resolution imgui is drawing etc?). I think the correct way is to set the GLFW hint for HDPI awareness and use glfwGetMonitorContentScale (Which more or less does what we are doing now). to get the scale every time it's needed - replacing the field. Also handling different x/y scaling.

Support older Windows Versions
@epezent
Copy link
Member

epezent commented Dec 1, 2020

Thanks Joel. I pushed the DPI code prematurely, see #33. It's all still a work in progress.

@JoelLinn
Copy link
Contributor Author

JoelLinn commented Dec 1, 2020

Yes I realized. Thats why I just tried to “fix it a little bit”, since currently it crashes on everything older than some windows 10 version. (Still got lab computers nobody wants to update :/ )

@JoelLinn
Copy link
Contributor Author

I see you disabled most of the code for now. Still SetProcessDpiAwareness() is Win 8.1+ only but statically linked. Why is that needed? GLFW calls it anyways, doesn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants