Fixed GPU model detection

This commit is contained in:
Ilya Zlobintsev 2020-11-12 14:44:32 +02:00
parent fb9fb3f161
commit 69aafd2a54

View File

@ -128,7 +128,7 @@ impl GpuController {
&"PCI_ID" => {
let ids = split.last().expect("failed to get split").split(':').collect::<Vec<&str>>();
vendor_id = ids.get(0).unwrap().to_string();
model_id = ids.get(0).unwrap().to_string();
model_id = ids.get(1).unwrap().to_string();
},
&"PCI_SUBSYS_ID" => {
let ids = split.last().expect("failed to get split").split(':').collect::<Vec<&str>>();
@ -160,6 +160,7 @@ impl GpuController {
card_vendor_id.to_lowercase(),
card_model_id.to_lowercase()
);
log::trace!("identifying {} \n {}", pci_id_line, card_ids_line);
let lines: Vec<&str> = full_hwid_list.split('\n').collect();