Fixed driver bug
This commit is contained in:
parent
6a71f0a801
commit
5ec6da3aad
5 changed files with 141 additions and 125 deletions
|
|
@ -96,7 +96,12 @@ impl Device {
|
|||
|
||||
impl Default for Devices {
|
||||
fn default() -> Devices {
|
||||
Devices{ drivers: sys::get_driver_list().into_iter() }
|
||||
// Remove offline drivers
|
||||
let driver_names: Vec<String> = sys::get_driver_list()
|
||||
.into_iter()
|
||||
.filter(|name| sys::Drivers::load(&name).is_ok())
|
||||
.collect();
|
||||
Devices{ drivers: driver_names.into_iter() }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue