1
0
mirror of https://github.com/Ylianst/MeshCommander synced 2025-12-10 21:33:31 +00:00

Fixed remote desktop display rotation mouse scaling bug.

This commit is contained in:
Ylian Saint-Hilaire
2021-10-18 09:30:35 -07:00
parent 3f982290a9
commit 322c78ea3f

View File

@@ -892,10 +892,14 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
if (event.addy) { obj.my += event.addy; }
// ###BEGIN###{DesktopRotation}
if ((obj.rotation == 1) || (obj.rotation == 3)) {
obj.mx = ((obj.mx * obj.rwidth) / obj.width);
obj.my = ((obj.my * obj.rheight) / obj.height);
}
if (obj.noMouseRotate != true) {
obj.mx2 = _crotX(obj.mx, obj.my);
var mx2 = _crotX(obj.mx, obj.my);
obj.my = _crotY(obj.mx, obj.my);
obj.mx = obj.mx2;
obj.mx = mx2;
}
// ###END###{DesktopRotation}