diff --git a/CHANGELOG.md b/CHANGELOG.md
index af4164b..8c9bff6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
+| 4.22.5 | 2020-03-04 | `graphics()` fixed vram macOS |
| 4.22.4 | 2020-03-01 | `versions()` added dotnet, typings fix |
| 4.22.3 | 2020-02-20 | `memLayout()` code cleanup |
| 4.22.2 | 2020-02-19 | `memLayout()` raspberry PI mem voltage fix |
diff --git a/docs/history.html b/docs/history.html
index a64a456..5e40337 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -83,6 +83,11 @@
+
+ | 4.22.5 |
+ 2020-03-04 |
+ graphics() fixed vram (macOS) |
+
| 4.22.4 |
2020-03-01 |
diff --git a/docs/index.html b/docs/index.html
index 681ca3b..1924802 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -168,7 +168,7 @@
systeminformation
- Current Version: 4.22.4
+ Current Version: 4.22.5
@@ -207,7 +207,7 @@
Downloads last month
diff --git a/lib/graphics.js b/lib/graphics.js
index 361803b..75f5941 100644
--- a/lib/graphics.js
+++ b/lib/graphics.js
@@ -133,10 +133,16 @@ function graphics(callback) {
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('vendor') !== -1) currentController.vendor = parts[1].split('(')[0].trim();
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('vram(total)') !== -1) {
currentController.vram = parseInt(parts[1]); // in MB
+ if (parts[1].toLowerCase().indexOf('gb') !== -1) {
+ currentController.vram = currentController.vram * 1024;
+ }
currentController.vramDynamic = false;
}
if (parts.length > 1 && parts[0].replace(/ +/g, '').toLowerCase().indexOf('vram(dynamic,max)') !== -1) {
currentController.vram = parseInt(parts[1]); // in MB
+ if (parts[1].toLowerCase().indexOf('gb') !== -1) {
+ currentController.vram = currentController.vram * 1024;
+ }
currentController.vramDynamic = true;
}
}