diff --git a/lib/graphics.js b/lib/graphics.js index 70c8ae6..0b62046 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -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; }