1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 23:13:13 -04:00

Make egui_wgpu::winit::Painter::set_window async (#2434)

* Make `egui_wgpu::winit::Painter::set_window` async

* Fix changelog link
This commit is contained in:
Emil Ernerfeldt
2022-12-12 15:37:55 +01:00
committed by GitHub
parent 7a658e3ddb
commit 6c4fc50fdf
6 changed files with 17 additions and 14 deletions

View File

@@ -950,7 +950,7 @@ mod wgpu_integration {
self.window = Some(window);
if let Some(running) = &mut self.running {
unsafe {
running.painter.set_window(self.window.as_ref())?;
pollster::block_on(running.painter.set_window(self.window.as_ref()))?;
}
}
Ok(())
@@ -962,7 +962,7 @@ mod wgpu_integration {
self.window = None;
if let Some(running) = &mut self.running {
unsafe {
running.painter.set_window(None)?;
pollster::block_on(running.painter.set_window(None))?;
}
}
Ok(())
@@ -981,7 +981,7 @@ mod wgpu_integration {
self.native_options.multisampling.max(1) as _,
self.native_options.depth_buffer,
);
painter.set_window(Some(&window))?;
pollster::block_on(painter.set_window(Some(&window)))?;
painter
};