From 0bae9cd9674517b5bcbdd39418320cfe2a111c70 Mon Sep 17 00:00:00 2001 From: Colleague Riley Date: Sun, 28 Jul 2024 17:32:56 -0400 Subject: [PATCH] update RGFW (fixes webasm callbacks) --- demo/common/RGFW.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/common/RGFW.h b/demo/common/RGFW.h index 6d31318..e236f5c 100755 --- a/demo/common/RGFW.h +++ b/demo/common/RGFW.h @@ -7174,8 +7174,8 @@ EM_BOOL Emscripten_on_keydown(int eventType, const EmscriptenKeyboardEvent* e, v RGFW_keyboard[RGFW_apiKeyCodeToRGFW(e->keyCode)].prev = RGFW_keyboard[RGFW_apiKeyCodeToRGFW(e->keyCode)].current; RGFW_keyboard[RGFW_apiKeyCodeToRGFW(e->keyCode)].current = 1; - RGFW_keyCallback(RGFW_root, e->keyCode, RGFW_events[RGFW_eventLen].keyName, 0, 1); - + RGFW_keyCallback(RGFW_root, RGFW_apiKeyCodeToRGFW(e->keyCode), RGFW_events[RGFW_eventLen].keyName, 0, 1); + return EM_TRUE; } @@ -7191,7 +7191,7 @@ EM_BOOL Emscripten_on_keyup(int eventType, const EmscriptenKeyboardEvent* e, voi RGFW_keyboard[RGFW_apiKeyCodeToRGFW(e->keyCode)].prev = RGFW_keyboard[RGFW_apiKeyCodeToRGFW(e->keyCode)].current; RGFW_keyboard[RGFW_apiKeyCodeToRGFW(e->keyCode)].current = 0; - RGFW_keyCallback(RGFW_root, e->keyCode, RGFW_events[RGFW_eventLen].keyName, 0, 0); + RGFW_keyCallback(RGFW_root, RGFW_apiKeyCodeToRGFW(e->keyCode), RGFW_events[RGFW_eventLen].keyName, 0, 0); return EM_TRUE; }