graphics() improving display detection (windows)
This commit is contained in:
parent
8e41e83317
commit
a4609a92fb
@ -698,15 +698,16 @@ function graphics(callback) {
|
||||
let vendor = '';
|
||||
let model = '';
|
||||
let deviceID = '';
|
||||
let resolutionx = 0;
|
||||
let resolutiony = 0;
|
||||
if (dsections && dsections.length) {
|
||||
let linesDisplay = dsections[0].split(os.EOL);
|
||||
vendor = util.getValue(linesDisplay, 'MonitorManufacturer', '=');
|
||||
model = util.getValue(linesDisplay, 'Name', '=');
|
||||
deviceID = util.getValue(linesDisplay, 'PNPDeviceID', '=').replace(/&/g, '&').toLowerCase();
|
||||
resolutionx = parseInt((util.getValue(linesDisplay, 'ScreenWidth', '=') || '0'), 10);
|
||||
resolutionx = parseInt((util.getValue(linesDisplay, 'ScreenHeight', '=') || '0'), 10);
|
||||
resolutionx = util.toInt(util.getValue(linesDisplay, 'ScreenWidth', '='));
|
||||
resolutiony = util.toInt(util.getValue(linesDisplay, 'ScreenHeight', '='));
|
||||
}
|
||||
|
||||
for (let i = 0; i < ssections.length; i++) {
|
||||
if (ssections[i].trim() !== '') {
|
||||
ssections[i] = 'BitsPerPixel ' + ssections[i];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user