mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
Desktop multip-lexor fixes.
This commit is contained in:
parent
034cba619c
commit
366ccff63b
@ -461,6 +461,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
|
|||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 3: // Tile, check dimentions and store
|
case 3: // Tile, check dimentions and store
|
||||||
|
if (data.length < 10) break;
|
||||||
var x = data.readUInt16BE(4), y = data.readUInt16BE(6);
|
var x = data.readUInt16BE(4), y = data.readUInt16BE(6);
|
||||||
var dimensions = require('image-size')(data.slice(8));
|
var dimensions = require('image-size')(data.slice(8));
|
||||||
var sx = (x / 16), sy = (y / 16), sw = (dimensions.width / 16), sh = (dimensions.height / 16);
|
var sx = (x / 16), sy = (y / 16), sw = (dimensions.width / 16), sh = (dimensions.height / 16);
|
||||||
@ -475,7 +476,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
|
|||||||
obj.imagesCount++;
|
obj.imagesCount++;
|
||||||
if (obj.imagesCount == 2000000000) { obj.imagesCount = 1; } // Loop the counter if needed
|
if (obj.imagesCount == 2000000000) { obj.imagesCount = 1; } // Loop the counter if needed
|
||||||
|
|
||||||
//console.log('Adding Image ' + obj.counter);
|
//console.log('Adding Image ' + obj.counter, x, y, dimensions.width, dimensions.height);
|
||||||
|
|
||||||
var skips = [];
|
var skips = [];
|
||||||
|
|
||||||
@ -519,6 +520,8 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
|
|||||||
case 4: // Tile Copy, do nothing.
|
case 4: // Tile Copy, do nothing.
|
||||||
break;
|
break;
|
||||||
case 7: // Screen Size, clear the screen state and compute the tile count
|
case 7: // Screen Size, clear the screen state and compute the tile count
|
||||||
|
if (data.length < 8) break;
|
||||||
|
if ((obj.width === data.readUInt16BE(4)) && (obj.height === data.readUInt16BE(6))) break; // Same screen size as before, skip this.
|
||||||
obj.counter++;
|
obj.counter++;
|
||||||
obj.lastScreenSizeCmd = data;
|
obj.lastScreenSizeCmd = data;
|
||||||
obj.lastScreenSizeCounter = obj.counter;
|
obj.lastScreenSizeCounter = obj.counter;
|
||||||
@ -552,6 +555,9 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
|
|||||||
obj.lastDisplayInfoData = data;
|
obj.lastDisplayInfoData = data;
|
||||||
obj.sendToAllViewers(data);
|
obj.sendToAllViewers(data);
|
||||||
break;
|
break;
|
||||||
|
case 12: // SetDisplay
|
||||||
|
obj.sendToAllViewers(data);
|
||||||
|
break;
|
||||||
case 14: // KVM_INIT_TOUCH
|
case 14: // KVM_INIT_TOUCH
|
||||||
break;
|
break;
|
||||||
case 15: // KVM_TOUCH
|
case 15: // KVM_TOUCH
|
||||||
|
@ -29855,4 +29855,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user