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

[GLFW backend] WindowSizeCallback() should not handle DPI scale. GLFW already do that #4143

Conversation

SuperUserNameMan
Copy link
Contributor

This fix #3972 on my Linux desktop.

Awaiting confirmation on Windows platform.

MACOS not impacted.

If FLAG_WINDOW_HIGHDPI is set, InitPlatform() will ask GLFW to handle the resizing of window content area based on the monitor content scale using : glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);

So WindowSizeCallback() should not try to handle DPI rescale a second time.

…aged by GLFW

If `FLAG_WINDOW_HIGHDPI` is set, `InitPlatform()` will aks GLFW to handle resize window content area based on the monitor content scale using : ` glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); `

So `WindowSizeCallback()` does not have to handle it a second time.
@SuperUserNameMan SuperUserNameMan changed the title WindowSizeCallback() should not handle DPI scale. GLFW already do that [GLFW backend] WindowSizeCallback() should not handle DPI scale. GLFW already do that Jul 8, 2024
@veins1
Copy link
Contributor

veins1 commented Jul 8, 2024

Works good on Windows

@raysan5 raysan5 merged commit 174313a into raysan5:master Jul 9, 2024
14 checks passed
@raysan5
Copy link
Owner

raysan5 commented Jul 9, 2024

@SuperUserNameMan @veins1 Looks good to me, thanks for the review!

@SuperUserNameMan
Copy link
Contributor Author

This PR improved the issue, but it was not the REAL solution.

I think i've found where the REAL problem was from.
I'll come back with the REAL solution with a new PR soon.

@SuperUserNameMan SuperUserNameMan deleted the fix-glfw-backend-hdpi-togglefullscreen branch July 26, 2024 13:39
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.

[rcore] ToggleFullscreen() not working as expected with HighDPI mode enabled
3 participants