diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-11-12 15:58:58 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-12 15:58:58 +0000 |
| commit | 91bd5d44187cc8ad48452db665acf7eb8a5cb19b (patch) | |
| tree | 02d44f8ebf52812e86ba3121fe5508b0603b203a /core/sys | |
| parent | 764c32fd3e7eb026236706ac682a09f8cd10cdc2 (diff) | |
| parent | 2beb495140d4100d80bc5b5a63830f2ba3285e61 (diff) | |
Merge pull request #4479 from p2jason/master
Increased the size of Javascript keyboard event key/code buffer size
Diffstat (limited to 'core/sys')
| -rw-r--r-- | core/sys/wasm/js/events.odin | 4 | ||||
| -rw-r--r-- | core/sys/wasm/js/odin.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/sys/wasm/js/events.odin b/core/sys/wasm/js/events.odin index 905b3eba9..ffa3a1202 100644 --- a/core/sys/wasm/js/events.odin +++ b/core/sys/wasm/js/events.odin @@ -186,8 +186,8 @@ Key_Location :: enum u8 { Numpad = 3, } -KEYBOARD_MAX_KEY_SIZE :: 16 -KEYBOARD_MAX_CODE_SIZE :: 16 +KEYBOARD_MAX_KEY_SIZE :: 32 +KEYBOARD_MAX_CODE_SIZE :: 32 GAMEPAD_MAX_ID_SIZE :: 64 GAMEPAD_MAX_MAPPING_SIZE :: 64 diff --git a/core/sys/wasm/js/odin.js b/core/sys/wasm/js/odin.js index 4d93bab23..07a77952c 100644 --- a/core/sys/wasm/js/odin.js +++ b/core/sys/wasm/js/odin.js @@ -1548,8 +1548,8 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement, memory) { wmi.storeInt(off(W, W), e.key.length) wmi.storeInt(off(W, W), e.code.length) - wmi.storeString(off(16, 1), e.key); - wmi.storeString(off(16, 1), e.code); + wmi.storeString(off(32, 1), e.key); + wmi.storeString(off(32, 1), e.code); } else if (e.type === 'scroll') { wmi.storeF64(off(8, 8), window.scrollX); wmi.storeF64(off(8, 8), window.scrollY); |