diff options
| author | AndreaBoroni <[email protected]> | 2023-11-03 19:12:42 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-03 19:12:42 +0100 |
| commit | 5da0074fed50f3a63d3c47aa0f2e1fbdc9051059 (patch) | |
| tree | 93d88925788d8193bfe3e6d5bf7e14f8e680a6a8 /src/rcore.c | |
| parent | 301d1b85ab62b13d072a0430668602398b382104 (diff) | |
| download | raylib-5da0074fed50f3a63d3c47aa0f2e1fbdc9051059.tar.gz raylib-5da0074fed50f3a63d3c47aa0f2e1fbdc9051059.zip | |
Fixed Issue 3504 (#3505)
Diffstat (limited to 'src/rcore.c')
| -rw-r--r-- | src/rcore.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rcore.c b/src/rcore.c index e4d8eae5..ac5dea84 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2520,7 +2520,16 @@ void PlayAutomationEvent(AutomationEvent event) { // Input event case INPUT_KEY_UP: CORE.Input.Keyboard.currentKeyState[event.params[0]] = false; break; // param[0]: key - case INPUT_KEY_DOWN: CORE.Input.Keyboard.currentKeyState[event.params[0]] = true; break; // param[0]: key + case INPUT_KEY_DOWN: { // param[0]: key + CORE.Input.Keyboard.currentKeyState[event.params[0]] = true; + if (CORE.Input.Keyboard.previousKeyState[event.params[0]] == false) { + if (CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) { + // Add character to the queue + CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = event.params[0]; + CORE.Input.Keyboard.keyPressedQueueCount++; + } + } + } break; case INPUT_MOUSE_BUTTON_UP: CORE.Input.Mouse.currentButtonState[event.params[0]] = false; break; // param[0]: key case INPUT_MOUSE_BUTTON_DOWN: CORE.Input.Mouse.currentButtonState[event.params[0]] = true; break; // param[0]: key case INPUT_MOUSE_POSITION: // param[0]: x, param[1]: y |
