mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Fix Windows backend invoking unreachable! with Exit and run_return (#887)
This commit is contained in:
parent
3a7350cbb9
commit
76660f3621
|
@ -380,6 +380,7 @@ impl<T> EventLoopRunner<T> {
|
||||||
// deferred.
|
// deferred.
|
||||||
if let RunnerState::DeferredNewEvents(wait_start) = self.runner_state {
|
if let RunnerState::DeferredNewEvents(wait_start) = self.runner_state {
|
||||||
match self.control_flow {
|
match self.control_flow {
|
||||||
|
ControlFlow::Exit |
|
||||||
ControlFlow::Wait => {
|
ControlFlow::Wait => {
|
||||||
self.call_event_handler(
|
self.call_event_handler(
|
||||||
Event::NewEvents(StartCause::WaitCancelled {
|
Event::NewEvents(StartCause::WaitCancelled {
|
||||||
|
@ -409,7 +410,6 @@ impl<T> EventLoopRunner<T> {
|
||||||
ControlFlow::Poll => {
|
ControlFlow::Poll => {
|
||||||
self.call_event_handler(Event::NewEvents(StartCause::Poll))
|
self.call_event_handler(Event::NewEvents(StartCause::Poll))
|
||||||
},
|
},
|
||||||
ControlFlow::Exit => unreachable!()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue