diff --git a/src/framework.rs b/src/framework.rs index 1478256..cdd8906 100644 --- a/src/framework.rs +++ b/src/framework.rs @@ -47,7 +47,7 @@ struct Setup { queue: wgpu::Queue, } -async fn setup(title: &str) -> Setup { +fn setup(title: &str) -> Setup { let event_loop = EventLoop::new(); let mut builder = winit::window::WindowBuilder::new(); builder = builder.with_title(title); @@ -131,7 +131,7 @@ async fn setup(title: &str) -> Setup { let needed_limits = E::required_limits().using_resolution(adapter.limits()); let trace_dir = std::env::var("WGPU_TRACE"); - let (device, queue) = adapter + let (device, queue) = pollster::block_on(adapter .request_device( &wgpu::DeviceDescriptor { label: None, @@ -139,8 +139,7 @@ async fn setup(title: &str) -> Setup { limits: needed_limits, }, trace_dir.ok().as_ref().map(std::path::Path::new), - ) - .await + )) .expect("Unable to find a suitable GPU adapter!"); Setup { @@ -275,6 +274,6 @@ fn start( } pub fn run(title: &str) { - let setup = pollster::block_on(setup::(title)); + let setup = setup::(title); start::(setup); }