graphics() fallback display detection (windows)
This commit is contained in:
@@ -687,6 +687,8 @@ function graphics(callback) {
|
||||
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);
|
||||
}
|
||||
|
||||
for (let i = 0; i < ssections.length; i++) {
|
||||
@@ -722,6 +724,22 @@ function graphics(callback) {
|
||||
});
|
||||
}
|
||||
}
|
||||
if (ssections.length === 0) {
|
||||
displays.push({
|
||||
vendor,
|
||||
model,
|
||||
main: true,
|
||||
resolutionx,
|
||||
resolutiony,
|
||||
sizex: -1,
|
||||
sizey: -1,
|
||||
pixeldepth: -1,
|
||||
currentResX: resolutionx,
|
||||
currentResY: resolutiony,
|
||||
positionX: 0,
|
||||
positionY: 0
|
||||
});
|
||||
}
|
||||
return displays;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user