fix inputs getting stuck

This commit is contained in:
2022-07-21 19:37:36 +02:00
parent 499bb02f2c
commit 1f5042059c

View File

@@ -182,13 +182,14 @@ impl WindowImpl for Window {
self.gamepads[0] |= gamepad_button(&input);
} else {
self.gamepads[1] &= !gamepad_button(&input);
self.gamepads[0] &= !gamepad_button(&input);
}
}
_ => (),
},
Event::RedrawEventsCleared => {
if Instant::now() >= self.next_frame
// workaround needed on Wayland until the next winit release
&& self.window.fullscreen().is_some() == self.is_fullscreen
{
*control_flow = ControlFlow::Exit