mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-28 17:59:17 -05:00
[rcore] Fix IsKeyPressedRepeat() for PLATFORM_DESKTOP_SDL (#3605)
* Fix IsKeyPressedRepeat() for PLATFORM_DESKTOP_SDL * Fix missing space
This commit is contained in:
@ -969,9 +969,6 @@ void PollInputEvents(void)
|
|||||||
CORE.Input.Keyboard.keyPressedQueueCount = 0;
|
CORE.Input.Keyboard.keyPressedQueueCount = 0;
|
||||||
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
||||||
|
|
||||||
// Reset key repeats
|
|
||||||
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
|
||||||
|
|
||||||
// Reset mouse wheel
|
// Reset mouse wheel
|
||||||
CORE.Input.Mouse.currentWheelMove.x = 0;
|
CORE.Input.Mouse.currentWheelMove.x = 0;
|
||||||
CORE.Input.Mouse.currentWheelMove.y = 0;
|
CORE.Input.Mouse.currentWheelMove.y = 0;
|
||||||
@ -1097,6 +1094,8 @@ void PollInputEvents(void)
|
|||||||
KeyboardKey key = ConvertScancodeToKey(event.key.keysym.scancode);
|
KeyboardKey key = ConvertScancodeToKey(event.key.keysym.scancode);
|
||||||
if (key != KEY_NULL) CORE.Input.Keyboard.currentKeyState[key] = 1;
|
if (key != KEY_NULL) CORE.Input.Keyboard.currentKeyState[key] = 1;
|
||||||
|
|
||||||
|
if (event.key.repeat) CORE.Input.Keyboard.keyRepeatInFrame[key] = 1;
|
||||||
|
|
||||||
// TODO: Put exitKey verification outside the switch?
|
// TODO: Put exitKey verification outside the switch?
|
||||||
if (CORE.Input.Keyboard.currentKeyState[CORE.Input.Keyboard.exitKey])
|
if (CORE.Input.Keyboard.currentKeyState[CORE.Input.Keyboard.exitKey])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user