Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Fix scaling of get_size on Windows #35

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Fix scaling of get_size on Windows #35

merged 1 commit into from
Nov 23, 2022

Conversation

raphlinus
Copy link
Contributor

Progress toward #26

Copy link
Contributor

@dfrg dfrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does what it says on the tin!

I was a bit confused until I read #26. I'm not sure how this will play with the scale calculation we do when building the swapchain.

@dfrg
Copy link
Contributor

dfrg commented Nov 23, 2022

Works nicely on windows with this fix!

@raphlinus
Copy link
Contributor Author

Having read that code, I believe that calculation just multiplies by the scale factor, so should give the correct result now. This is all a bit different than the existing druid-shell code, where I think the relevant logic is directly in the WM_SIZE handler. (And, reviewing that code, I think it's less than ideal, because it seems to create a swapchain with fixed size of 1024x768, then do a ResizeBuffers on WM_SIZE. More than once I've felt like I've picked up a rock and watched the bugs scurry around).

@raphlinus raphlinus merged commit 464c328 into main Nov 23, 2022
@raphlinus raphlinus deleted the windows_dpi branch November 23, 2022 23:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants