graphics() improving display detection (windows)
This commit is contained in:
parent
8acd0ece14
commit
8e41e83317
@ -605,7 +605,7 @@ function graphics(callback) {
|
||||
});
|
||||
result.displays = parseLinesWindowsDisplaysPowershell(ssections, msections, dsections, tsections, isections);
|
||||
|
||||
if (result.controllers.length === 1 && result.displays.length === 1) {
|
||||
if (result.displays.length === 1) {
|
||||
if (_resolutionx) {
|
||||
result.displays[0].resolutionx = _resolutionx;
|
||||
if (!result.displays[0].currentResX) {
|
||||
@ -659,10 +659,10 @@ function graphics(callback) {
|
||||
vram: parseInt(util.getValue(lines, 'AdapterRAM', '='), 10) / 1024 / 1024,
|
||||
vramDynamic: (util.getValue(lines, 'VideoMemoryType', '=') === '2')
|
||||
});
|
||||
_resolutionx = util.toInt(util.getValue(lines, 'CurrentHorizontalResolution', '='));
|
||||
_resolutiony = util.toInt(util.getValue(lines, 'CurrentVerticalResolution', '='));
|
||||
_refreshrate = util.toInt(util.getValue(lines, 'CurrentRefreshRate', '='));
|
||||
_pixeldepth = util.toInt(util.getValue(lines, 'CurrentBitsPerPixel', '='));
|
||||
_resolutionx = util.toInt(util.getValue(lines, 'CurrentHorizontalResolution', '=')) || _resolutionx;
|
||||
_resolutiony = util.toInt(util.getValue(lines, 'CurrentVerticalResolution', '=')) || _resolutiony;
|
||||
_refreshrate = util.toInt(util.getValue(lines, 'CurrentRefreshRate', '=')) || _refreshrate;
|
||||
_pixeldepth = util.toInt(util.getValue(lines, 'CurrentBitsPerPixel', '=')) || _pixeldepth;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -725,7 +725,7 @@ function graphics(callback) {
|
||||
let displayVendor = '';
|
||||
let displayModel = '';
|
||||
isections.forEach(element => {
|
||||
if (element.instanceId.toLowerCase() === instanceName) {
|
||||
if (element.instanceId.toLowerCase().startsWith(instanceName)) {
|
||||
displayVendor = element.vendor;
|
||||
displayModel = element.model;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user