From c4a05de72c7d5b9bb247624c3f61eac6fbfe9d2d Mon Sep 17 00:00:00 2001 From: bigfoodk Date: Sat, 28 Sep 2024 01:41:45 +0900 Subject: [PATCH] Fix wrong buffer index on emitting wheel event --- namui/namui-cli/webCode/src/eventSystem.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/namui/namui-cli/webCode/src/eventSystem.ts b/namui/namui-cli/webCode/src/eventSystem.ts index dbf81de8b..2a69c246e 100644 --- a/namui/namui-cli/webCode/src/eventSystem.ts +++ b/namui/namui-cli/webCode/src/eventSystem.ts @@ -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);