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

Update winit to 0.29.10 #356

Merged
merged 1 commit into from
Feb 24, 2024
Merged

Update winit to 0.29.10 #356

merged 1 commit into from
Feb 24, 2024

Conversation

patowen
Copy link
Collaborator

@patowen patowen commented Feb 24, 2024

winit now defaults to raw-window-handle 0.6, but ash-window is not yet compatible with this version of raw-window-handle. Fortunately, the rwh_05 feature allows the use of the older version of raw-window-handle.

A few notable changes:

  • winit did an overhaul of keyboard input, so the use of virtual_keycode had to be replaced with physical_key or logical_key. I guessed that physical_key was better.
  • Event::MainEventsCleared was removed from winit, so I needed to switch to AboutToWait. However, I used https://github.com/rust-windowing/winit/blob/7bed5eecfdcbde16e5619fd137f0229e8e7e8ed4/examples/request_redraw.rs as an example, which had me make the additional change of putting all the frame logic in WindowEvent::RedrawRequested and using self.window.request_redraw in Event::AboutToWait. I'm not certain this is what we want for Hypermine, but I didn't notice any issues on my end when testing it.

(I meant to re-open #325, but GitHub disallowed it. If it still has problems, I might leave this PR open as a draft instead of closing it.)

EDIT: It looks like all CI checks have passed this time. This PR should be ready to review.

@patowen patowen requested a review from Ralith February 24, 2024 17:59
@Ralith Ralith merged commit d3c4cd1 into Ralith:master Feb 24, 2024
6 checks passed
@patowen patowen deleted the update-winit branch February 24, 2024 22:43
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