graphics() added display position windows
This commit is contained in:
@@ -82,6 +82,8 @@ function graphics(callback) {
|
||||
resolutiony: -1,
|
||||
currentResX: -1,
|
||||
currentResY: -1,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
currentRefreshRate: -1
|
||||
};
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
@@ -117,6 +119,8 @@ function graphics(callback) {
|
||||
resolutiony: -1,
|
||||
currentResX: -1,
|
||||
currentResY: -1,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
currentRefreshRate: -1
|
||||
};
|
||||
}
|
||||
@@ -145,6 +149,8 @@ function graphics(callback) {
|
||||
currentDisplay.connection = '';
|
||||
currentDisplay.sizex = -1;
|
||||
currentDisplay.sizey = -1;
|
||||
currentDisplay.positionX = 0;
|
||||
currentDisplay.positionY = 0;
|
||||
currentDisplay.pixeldepth = -1;
|
||||
}
|
||||
}
|
||||
@@ -302,6 +308,8 @@ function graphics(callback) {
|
||||
resolutiony: -1,
|
||||
currentResX: -1,
|
||||
currentResY: -1,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
currentRefreshRate: -1
|
||||
};
|
||||
// find first "Detailed Timing Description"
|
||||
@@ -359,6 +367,8 @@ function graphics(callback) {
|
||||
resolutiony: -1,
|
||||
currentResX: -1,
|
||||
currentResY: -1,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
currentRefreshRate: -1
|
||||
};
|
||||
let is_edid = false;
|
||||
@@ -383,6 +393,8 @@ function graphics(callback) {
|
||||
resolutiony: -1,
|
||||
currentResX: -1,
|
||||
currentResY: -1,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
currentRefreshRate: -1
|
||||
};
|
||||
}
|
||||
@@ -481,6 +493,8 @@ function graphics(callback) {
|
||||
resolutiony: parseInt(parts[1], 10),
|
||||
currentResX: -1,
|
||||
currentResY: -1,
|
||||
positionX: 0,
|
||||
positionY: 0,
|
||||
currentRefreshRate: -1
|
||||
});
|
||||
}
|
||||
@@ -703,6 +717,8 @@ function graphics(callback) {
|
||||
pixeldepth: bitsPerPixel,
|
||||
currentResX: util.toInt(util.getValue(bounds, 'Width', '=')),
|
||||
currentResY: util.toInt(util.getValue(bounds, 'Height', '=')),
|
||||
positionX: util.toInt(util.getValue(bounds, 'X', '=')),
|
||||
positionY: util.toInt(util.getValue(bounds, 'Y', '=')),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -179,6 +179,8 @@ export namespace Systeminformation {
|
||||
resolutiony: number;
|
||||
currentResX: number;
|
||||
currentResY: number;
|
||||
positionX: number;
|
||||
positionY: number;
|
||||
currentRefreshRate: number;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -470,8 +470,8 @@ function processes(callback) {
|
||||
let command = '';
|
||||
let params = '';
|
||||
// try to figure out where parameter starts
|
||||
let firstParamPos = fullcommand.indexOf(' -')
|
||||
let firstParamPathPos = fullcommand.indexOf(' /')
|
||||
let firstParamPos = fullcommand.indexOf(' -');
|
||||
let firstParamPathPos = fullcommand.indexOf(' /');
|
||||
firstParamPos = (firstParamPos >= 0 ? firstParamPos : 10000);
|
||||
firstParamPathPos = (firstParamPathPos >= 0 ? firstParamPathPos : 10000);
|
||||
const firstPos = Math.min(firstParamPos, firstParamPathPos);
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ function system(callback) {
|
||||
result.serial = util.getValue(lines, 'serial', ':', true);
|
||||
|
||||
// reference values: https://elinux.org/RPi_HardwareHistory
|
||||
https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
|
||||
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
|
||||
if (result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2835' || result.model === 'BCM2837') {
|
||||
|
||||
// Pi 4
|
||||
|
||||
Reference in New Issue
Block a user