parent
bbf9935828
commit
66a2cdee40
1 changed files with 3 additions and 3 deletions
|
@ -3516,7 +3516,7 @@ int GetKeyPressed(void)
|
||||||
CORE.Input.Keyboard.keyPressedQueue[i] = CORE.Input.Keyboard.keyPressedQueue[i + 1];
|
CORE.Input.Keyboard.keyPressedQueue[i] = CORE.Input.Keyboard.keyPressedQueue[i + 1];
|
||||||
|
|
||||||
// Reset last character in the queue
|
// Reset last character in the queue
|
||||||
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = 0;
|
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount - 1] = 0;
|
||||||
CORE.Input.Keyboard.keyPressedQueueCount--;
|
CORE.Input.Keyboard.keyPressedQueueCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3538,7 +3538,7 @@ int GetCharPressed(void)
|
||||||
CORE.Input.Keyboard.charPressedQueue[i] = CORE.Input.Keyboard.charPressedQueue[i + 1];
|
CORE.Input.Keyboard.charPressedQueue[i] = CORE.Input.Keyboard.charPressedQueue[i + 1];
|
||||||
|
|
||||||
// Reset last character in the queue
|
// Reset last character in the queue
|
||||||
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount] = 0;
|
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount - 1] = 0;
|
||||||
CORE.Input.Keyboard.charPressedQueueCount--;
|
CORE.Input.Keyboard.charPressedQueueCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5372,7 +5372,7 @@ static void CharCallback(GLFWwindow *window, unsigned int key)
|
||||||
// Ref: https://www.glfw.org/docs/latest/input_guide.html#input_char
|
// Ref: https://www.glfw.org/docs/latest/input_guide.html#input_char
|
||||||
|
|
||||||
// Check if there is space available in the queue
|
// Check if there is space available in the queue
|
||||||
if (CORE.Input.Keyboard.charPressedQueueCount < MAX_KEY_PRESSED_QUEUE)
|
if (CORE.Input.Keyboard.charPressedQueueCount < MAX_CHAR_PRESSED_QUEUE)
|
||||||
{
|
{
|
||||||
// Add character to the queue
|
// Add character to the queue
|
||||||
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount] = key;
|
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount] = key;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue