Browse Source

Fixed Issue 3504 (#3505)

pull/3506/head
AndreaBoroni 1 year ago
committed by GitHub
parent
commit
5da0074fed
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/rcore.c

+ 10
- 1
src/rcore.c View File

@ -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

Loading…
Cancel
Save