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

Fix controller button messages not being sent #8

Merged
merged 1 commit into from
Jul 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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