Skip to content

Commit

Permalink
Don't panic on the lack of adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Oct 29, 2019
1 parent 6a65178 commit 41132a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wgpu-native/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ pub fn request_adapter(
};

if device_types.is_empty() {
panic!("No adapters are available!");
log::warn!("No adapters are available!");
return None;
}

let (mut integrated, mut discrete, mut virt, mut other) = (None, None, None, None);
Expand Down Expand Up @@ -463,7 +464,7 @@ pub fn request_adapter(
selected -= adapters_dx11.len();
}
let _ = (selected, id_vulkan, id_metal, id_dx12, id_dx11);
None
unreachable!()
}

#[cfg(feature = "local")]
Expand Down

0 comments on commit 41132a3

Please sign in to comment.