Fix Repeat ENTER/BACKSPACE keys
GetCharPressed handles character repetition correctly, but GetKeyPressed didn't repeat keys (like ENTER and BACKSPACE). Repeting a key on GLFW_REPEAT fixes the problem
This commit is contained in:
parent
f8b352f6d9
commit
bd5f8c1e10
|
|
@ -5460,7 +5460,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Check if there is space available in the key queue
|
// Check if there is space available in the key queue
|
||||||
if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS))
|
if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS || action == GLFW_REPEAT))
|
||||||
{
|
{
|
||||||
// Add character to the queue
|
// Add character to the queue
|
||||||
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = key;
|
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = key;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user