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.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 9ae1364d..32423e80 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -115,11 +115,12 @@ where
use futures::task;
use futures::Future;
use winit::event_loop::EventLoop;
+ use winit::platform::run_return::EventLoopExtRunReturn;
let mut debug = Debug::new();
debug.startup_started();
- let event_loop = EventLoop::with_user_event();
+ let mut event_loop = EventLoop::with_user_event();
let mut proxy = event_loop.create_proxy();
let mut runtime = {
@@ -178,7 +179,7 @@ where
let mut context = task::Context::from_waker(task::noop_waker_ref());
- event_loop.run(move |event, _, control_flow| {
+ event_loop.run_return(move |event, _, control_flow| {
use winit::event_loop::ControlFlow;
if let ControlFlow::Exit = control_flow {
@@ -211,6 +212,8 @@ where
};
}
});
+
+ Ok(())
}
async fn run_instance<A, E, C>(
@@ -401,7 +404,7 @@ async fn run_instance<A, E, C>(
Err(error) => match error {
// This is an unrecoverable error.
window::SurfaceError::OutOfMemory => {
- panic!("{}", error);
+ panic!("{:?}", error);
}
_ => {
debug.render_finished();