Skip to content

Commit

Permalink
UI3-274:
Browse files Browse the repository at this point in the history
* Reverted a few recent javascript syntax changes that caused syntax errors in old browsers.
  • Loading branch information
bp2008 committed Aug 22, 2024
1 parent fb91891 commit 452e3a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "273";
var ui_version = "274";
var bi_version = "%%VERSION%%";
var appPath_raw = "%%VIRTDIR%%";
var local_bi_session = "%%SESSION%%";
Expand Down
6 changes: 3 additions & 3 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -7155,7 +7155,7 @@ function GamepadPtzController()
console.log(
"Gamepad disconnected from index %d: %s",
e.gamepad.index,
e.gamepad.id,
e.gamepad.id
);
}

Expand All @@ -7170,7 +7170,7 @@ function GamepadPtzController()
gamepad.index,
gamepad.id,
gamepad.buttons.length,
gamepad.axes.length,
gamepad.axes.length
);
}
}
Expand Down Expand Up @@ -7452,7 +7452,7 @@ function TranslateJoystickInputsIntoBitmask(axisX, axisY, axisZoomIn, axisZoomOu
var scaledUp = Clamp(Math.round(normalized * 15), 1, 15);
scaledUp = ~~scaledUp; // cast to int
//console.log("normalized", normalized, "scaledUp", scaledUp);
return scaledUp & 0b1111;
return scaledUp & 15; // 15 is 0b1111;
}
var dbg = "";// "axisX " + axisX + ", axisY " + axisY;
var bitmask = 0;
Expand Down

0 comments on commit 452e3a6

Please sign in to comment.