From caccec5b49735d8372edf0c488147adf7ed2a48c Mon Sep 17 00:00:00 2001 From: bigfoodK <38313680+bigfoodK@users.noreply.github.com> Date: Sat, 28 Sep 2024 09:45:07 +0900 Subject: [PATCH] Fix wrong buffer index on emitting wheel event (#971) --- 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);