mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-02-24 00:37:43 +11:00
control_flow example: fix wait_cancelled logic again (#1511)
This commit is contained in:
parent
d5609729cc
commit
4c4d0916fd
1 changed files with 3 additions and 9 deletions
|
@ -41,15 +41,9 @@ fn main() {
|
||||||
println!("{:?}", event);
|
println!("{:?}", event);
|
||||||
match event {
|
match event {
|
||||||
Event::NewEvents(start_cause) => {
|
Event::NewEvents(start_cause) => {
|
||||||
wait_cancelled = mode == Mode::WaitUntil;
|
wait_cancelled = match start_cause {
|
||||||
match start_cause {
|
StartCause::WaitCancelled { .. } => mode == Mode::WaitUntil,
|
||||||
StartCause::ResumeTimeReached {
|
_ => false,
|
||||||
start: _,
|
|
||||||
requested_resume: _,
|
|
||||||
} => {
|
|
||||||
wait_cancelled = false;
|
|
||||||
}
|
|
||||||
_ => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Event::WindowEvent { event, .. } => match event {
|
Event::WindowEvent { event, .. } => match event {
|
||||||
|
|
Loading…
Add table
Reference in a new issue