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