bugfix graphics(), fixed typo README.md

This commit is contained in:
Sebastian Hildebrandt 2017-10-21 08:42:51 +02:00
parent 43cde28685
commit c0bc1c898d
3 changed files with 5 additions and 1 deletions

View File

@ -98,6 +98,7 @@ Other changes
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 3.31.3 | 2017-10-21 | bugfix `graphics()`, fixed typo `README.md` |
| 3.31.2 | 2017-10-16 | bugfix `graphics()` vendor and model parsing linux VGA/3D |
| 3.31.1 | 2017-10-16 | bugfix `graphics()` vendor and model parsing linux |
| 3.31.0 | 2017-10-15 | extended windows support `cpuFlags()` (partially) |

View File

@ -446,7 +446,7 @@ si.networkStats('eth1', function(data) {
**Promises Style** is new in version 3.0.
When omitting callback parameter (cb), then you can use all function in a promise oriented way. All functions (exept of `version` and `time`) are returning a promis, that you can consume:
When omitting callback parameter (cb), then you can use all function in a promise oriented way. All functions (exept of `version` and `time`) are returning a promise, that you can consume:
```js
const si = require('systeminformation');

View File

@ -126,6 +126,9 @@ function graphics(callback) {
let vgapos = lines[i].toLowerCase().indexOf('vga');
let _3dcontrollerpos = lines[i].toLowerCase().indexOf('3d controller');
if (vgapos !== -1 || _3dcontrollerpos !== -1) { // VGA
if (_3dcontrollerpos !== -1 && vgapos === -1) {
vgapos = _3dcontrollerpos;
}
if (Object.keys(currentController).length > 0) {// already a controller found
controllers.push(currentController);
currentController = {};