summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index b04fc609..1d32a5f3 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -391,16 +391,16 @@ async fn run_instance<A, E, C>(
// Maybe we can use `ControlFlow::WaitUntil` for this.
}
Err(error) => match error {
- window::CompositorDrawError::SwapchainOutdated(_) => {
+ // This is an unrecoverable error.
+ window::SwapChainError::OutOfMemory => {
+ panic!("{}", error);
+ }
+ _ => {
debug.render_finished();
- // Swapchain is outdated. Try rendering again next frame.
+ // Try rendering again next frame.
window.request_redraw();
}
- window::CompositorDrawError::FatalSwapchainError(e) => {
- // Fatal swapchain error. Rendering cannot continue.
- panic!("{}", e);
- }
},
}
}