graphics() controller subid fix (win)
This commit is contained in:
+9
-5
@@ -720,8 +720,8 @@ function graphics(callback) {
|
||||
result.controllers = parseLinesLinuxControllers(lines);
|
||||
const nvidiaData = nvidiaDevices();
|
||||
// needs to be rewritten ... using no spread operators
|
||||
result.controllers = result.controllers.map(( controller ) => { // match by busAddress
|
||||
return mergeControllerNvidia(controller, nvidiaData.find(({ pciBus }) => pciBus.endsWith(controller.busAddress)) || {} );
|
||||
result.controllers = result.controllers.map((controller) => { // match by busAddress
|
||||
return mergeControllerNvidia(controller, nvidiaData.find(({ pciBus }) => pciBus.endsWith(controller.busAddress)) || {});
|
||||
})
|
||||
}
|
||||
let cmd = "clinfo --raw";
|
||||
@@ -887,9 +887,13 @@ function graphics(callback) {
|
||||
if (sections[i].trim() !== '') {
|
||||
|
||||
let lines = sections[i].trim().split('\r\n');
|
||||
let subDeviceId = util.getValue(lines, 'PNPDeviceID', '=').match(/SUBSYS_[a-fA-F\d]{8}/)[0];
|
||||
if (subDeviceId) {
|
||||
subDeviceId = subDeviceId.split('_')[1];
|
||||
let pnpDeviceId = util.getValue(lines, 'PNPDeviceID', '=').match(/SUBSYS_[a-fA-F\d]{8}/);
|
||||
let subDeviceId = null;
|
||||
if (pnpDeviceId) {
|
||||
subDeviceId = pnpDeviceId[0];
|
||||
if (subDeviceId) {
|
||||
subDeviceId = subDeviceId.split('_')[1];
|
||||
}
|
||||
}
|
||||
controllers.push({
|
||||
vendor: util.getValue(lines, 'AdapterCompatibility', '='),
|
||||
|
||||
Reference in New Issue
Block a user