Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GetKeyPressed for PLATFORM_DESKTOP_SDL (raysan5#3869)
The key handling in PLATFORM_DESKTOP_SDL was faulty in two ways, which led to GetKeyPressed returning incorrect data. CORE.Input.Keyboard.keyPressedQueue was updated only on SDL_TEXTINPUT, meaning only text characters were registered as a pressed key, but not function keys (eg. tab, backspace...). Also on such event, both CORE.Input.Keyboard.keyPressedQueue and CORE.Input.Keyboard.charPressedQueue were assigned the key's corresponding codepoint, when CORE.Input.Keyboard.keyPressedQueue should get the raylib keycode instead. CORE.Input.Keyboard.keyPressedQueue is now updated on SDL_KEYDOWN event instead. Co-authored-by: Arthur <[email protected]>
- Loading branch information