testdriverai 4.2.23 → 4.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/system.js +11 -5
- package/package.json +1 -1
package/lib/system.js
CHANGED
|
@@ -16,13 +16,19 @@ let primaryDisplay = null;
|
|
|
16
16
|
// this is the only display we ever target, because fuck it
|
|
17
17
|
// the vm only has one and most people only have one
|
|
18
18
|
const getPrimaryDisplay = async () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let primaryDisplay = graphics.displays.find(
|
|
22
|
-
(display) => display.main == true,
|
|
23
|
-
);
|
|
19
|
+
|
|
20
|
+
if (!primaryDisplay) {
|
|
24
21
|
|
|
22
|
+
// calculate scaling resolution
|
|
23
|
+
let graphics = await si.graphics();
|
|
24
|
+
primaryDisplay = graphics.displays.find(
|
|
25
|
+
(display) => display.main == true,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
return primaryDisplay;
|
|
31
|
+
|
|
26
32
|
};
|
|
27
33
|
|
|
28
34
|
const getSystemInformationOsInfo = async () => {
|