Make ControlFlow::Wait the default (#3106)
This commit is contained in:
parent
e2e01e1fc6
commit
878d832d24
34 changed files with 154 additions and 228 deletions
|
|
@ -14,7 +14,7 @@ fn main() -> std::process::ExitCode {
|
|||
use simple_logger::SimpleLogger;
|
||||
use winit::{
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::{ControlFlow, EventLoop},
|
||||
event_loop::EventLoop,
|
||||
platform::pump_events::{EventLoopExtPumpEvents, PumpStatus},
|
||||
window::WindowBuilder,
|
||||
};
|
||||
|
|
@ -33,8 +33,6 @@ fn main() -> std::process::ExitCode {
|
|||
'main: loop {
|
||||
let timeout = Some(Duration::ZERO);
|
||||
let status = event_loop.pump_events(timeout, |event, elwt| {
|
||||
elwt.set_control_flow(ControlFlow::Wait);
|
||||
|
||||
if let Event::WindowEvent { event, .. } = &event {
|
||||
// Print only Window events to reduce noise
|
||||
println!("{event:?}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue