mirror of
https://github.com/hannobraun/Fornjot
synced 2025-10-11 18:38:10 +00:00
Make surface creation safe
This commit is contained in:
parent
1fb88651c7
commit
c99d92dfde
@ -44,12 +44,7 @@ impl Renderer {
|
||||
});
|
||||
|
||||
// This is sound, as `window` is an object to create a surface upon.
|
||||
let surface = unsafe {
|
||||
instance.create_surface_unsafe(
|
||||
wgpu::SurfaceTargetUnsafe::from_window(&screen.window())
|
||||
.unwrap(),
|
||||
)
|
||||
}?;
|
||||
let surface = instance.create_surface(screen.window())?;
|
||||
|
||||
for adapter in instance.enumerate_adapters(wgpu::Backends::all()) {
|
||||
debug!("Available adapter: {:?}", adapter.get_info());
|
||||
|
Loading…
x
Reference in New Issue
Block a user