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

winit 1.29.2 support difficulties #51

Open
monomere opened this issue Oct 23, 2023 · 0 comments
Open

winit 1.29.2 support difficulties #51

monomere opened this issue Oct 23, 2023 · 0 comments

Comments

@monomere
Copy link

monomere commented Oct 23, 2023

I updated winit to 1.29.2, and, because there doesn't seem to be support for it already, decided to quickly update the platform code.

Fortunately, it's all pretty smooth! Although there are a bunch of breaking changes, everything seems to work just fine except one thing: winit::event::WindowEvent::ScaleFactorChanged

The current implementation uses new_inner_size, but this field has been replaced by inner_size_writer in the new version of winit. The new inner_size_writer doesn't allow you to get the suggested inner_size (i.e. new_inner_size) for some reason... So we have to have access to the Window (for Window::inner_size()) Maybe I haven't looked hard enough, but I don't see any way to access the window from anywhere inside Platform (the optional argument in end_frame doesn't work)

My question is: is passing a window reference to handle_event the only way to do this for now?

Note: I will make a pull request when this gets resolved (or should I do it now?)

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

No branches or pull requests

1 participant