Skip to content

Commit

Permalink
Fix wrong buffer index on emitting wheel event (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfoodK authored Sep 28, 2024
1 parent c19db74 commit caccec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions namui/namui-cli/webCode/src/eventSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ export function startEventSystemOnMainThread(eventBuffer: SharedArrayBuffer): {
eventBufferView.setUint8(eventBufferIndex, EVENT_TYPE.WHEEL);
eventBufferView.setFloat32(eventBufferIndex + 1, event.deltaX);
eventBufferView.setFloat32(eventBufferIndex + 5, event.deltaY);
eventBufferView.setUint16(eventBufferIndex + 10, event.clientX);
eventBufferView.setUint16(eventBufferIndex + 12, event.clientY);
eventBufferView.setUint16(eventBufferIndex + 9, event.clientX);
eventBufferView.setUint16(eventBufferIndex + 11, event.clientY);
eventBufferIndex += 13;

Atomics.add(i32Array, 0, 1);
Expand Down

0 comments on commit caccec5

Please sign in to comment.