summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2023-11-10 19:48:47 +0100
committerRay <[email protected]>2023-11-10 19:48:47 +0100
commit107ece438a5af6fe56a7dbd6f13088c37e31785e (patch)
tree42e3bbc01405d0e8e6b99dd4f78dc1a36216e1dd
parente7ba72ded90a32fb2cd06b5026545b6b79714af8 (diff)
downloadraylib-107ece438a5af6fe56a7dbd6f13088c37e31785e.tar.gz
raylib-107ece438a5af6fe56a7dbd6f13088c37e31785e.zip
Reviewed duplicate lines
-rw-r--r--src/platforms/rcore_desktop.c3
-rw-r--r--src/platforms/rcore_web.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c
index 5a3627cd..05c390f9 100644
--- a/src/platforms/rcore_desktop.c
+++ b/src/platforms/rcore_desktop.c
@@ -1106,7 +1106,6 @@ void PollInputEvents(void)
// Reset keys/chars pressed registered
CORE.Input.Keyboard.keyPressedQueueCount = 0;
CORE.Input.Keyboard.charPressedQueueCount = 0;
- for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
// Reset last gamepad button/axis registered state
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
@@ -1225,7 +1224,7 @@ void PollInputEvents(void)
CORE.Window.resizedLastFrame = false;
if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
- else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks)
+ else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks) -> Update keys state
// While window minimized, stop loop execution
while (IsWindowState(FLAG_WINDOW_MINIMIZED) && !IsWindowState(FLAG_WINDOW_ALWAYS_RUN)) glfwWaitEvents();
diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c
index 2b9da11b..15c0f5a2 100644
--- a/src/platforms/rcore_web.c
+++ b/src/platforms/rcore_web.c
@@ -559,7 +559,6 @@ void PollInputEvents(void)
// Reset keys/chars pressed registered
CORE.Input.Keyboard.keyPressedQueueCount = 0;
CORE.Input.Keyboard.charPressedQueueCount = 0;
- for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
// Reset last gamepad button/axis registered state
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
@@ -663,12 +662,11 @@ void PollInputEvents(void)
CORE.Window.resizedLastFrame = false;
- // This code does not seem to do anything??
+ // TODO: This code does not seem to do anything??
//if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
- //else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks)
+ //else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks) --> WARNING: Where is key input reseted?
}
-
//----------------------------------------------------------------------------------
// Module Internal Functions Definition
//----------------------------------------------------------------------------------