graphics() Apple silicon compatibility
This commit is contained in:
parent
ba4477ca7f
commit
51fba64ba7
@ -133,7 +133,6 @@ function graphics(callback) {
|
||||
let parts = lines[i].split(':');
|
||||
if (2 === level) { // grafics controller level
|
||||
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('chipsetmodel') !== -1) currentController.model = parts[1].trim();
|
||||
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('bus') !== -1) currentController.bus = parts[1].trim();
|
||||
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('vendor') !== -1) currentController.vendor = parts[1].split('(')[0].trim();
|
||||
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('vram(total)') !== -1) {
|
||||
currentController.vram = parseInt(parts[1]); // in MB
|
||||
@ -149,6 +148,12 @@ function graphics(callback) {
|
||||
}
|
||||
currentController.vramDynamic = true;
|
||||
}
|
||||
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('bus') !== -1) {
|
||||
currentController.bus = parts[1].trim();
|
||||
if (currentController.bus.toLowerCase() === 'built-in') {
|
||||
currentController.vramDynamic = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (3 === level) { // display controller level
|
||||
if (parts.length > 1 && '' === parts[1]) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user