Make ControlFlow::Wait the default (#3106)

This commit is contained in:
daxpedda 2023-09-22 21:27:11 +02:00 committed by GitHub
parent e2e01e1fc6
commit 878d832d24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 154 additions and 228 deletions

View file

@ -6,7 +6,7 @@ use simple_logger::SimpleLogger;
use winit::{
dpi::LogicalSize,
event::{ElementState, Event, KeyEvent, WindowEvent},
event_loop::{ControlFlow, DeviceEvents, EventLoop},
event_loop::{DeviceEvents, EventLoop},
keyboard::Key,
window::{WindowBuilder, WindowButtons},
};
@ -32,8 +32,6 @@ fn main() -> Result<(), impl std::error::Error> {
event_loop.listen_device_events(DeviceEvents::Always);
event_loop.run(move |event, elwt| {
elwt.set_control_flow(ControlFlow::Wait);
if let Event::WindowEvent { window_id, event } = event {
match event {
WindowEvent::KeyboardInput {