Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from make-live/fix-controller-buttons
Browse files Browse the repository at this point in the history
Fix controller button messages not being sent
  • Loading branch information
lukehb committed Jul 10, 2022
2 parents f8d1019 + ca6644f commit 11e19a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SignallingWebServer/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,15 @@ function emitControllerButtonPressed(controllerIndex, buttonIndex, isRepeat) {
Data.setUint8(1, controllerIndex);
Data.setUint8(2, buttonIndex);
Data.setUint8(3, isRepeat);
sendInputData(Data.buffer);
}

function emitControllerButtonReleased(controllerIndex, buttonIndex) {
Data = new DataView(new ArrayBuffer(3));
Data.setUint8(0, MessageType.GamepadButtonReleased);
Data.setUint8(1, controllerIndex);
Data.setUint8(2, buttonIndex);
sendInputData(Data.buffer);
}

function emitControllerAxisMove(controllerIndex, axisIndex, analogValue) {
Expand Down

0 comments on commit 11e19a0

Please sign in to comment.