summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRyan Roden-Corrent <[email protected]>2021-08-10 12:38:32 -0400
committerGitHub <[email protected]>2021-08-10 18:38:32 +0200
commitef9fdd0fa5dcfbf4c3c538b56d285230e8d6af1e (patch)
tree996134226439ca04beaf108f127fc214f38b79ff /src/raylib.h
parent311fe8f35b8dbe79af162b10ea980824b92115b4 (diff)
downloadraylib-ef9fdd0fa5dcfbf4c3c538b56d285230e8d6af1e.tar.gz
raylib-ef9fdd0fa5dcfbf4c3c538b56d285230e8d6af1e.zip
Document Get{Key,Char}Pressed return value. (#1909)
I think it is useful to know what the empty behavior is in cases where you are enumerating key presses (e.g. implementing "press any key to continue").
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 92e592e9..f02f46f6 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -1077,8 +1077,8 @@ RLAPI bool IsKeyDown(int key); // Check if a key
RLAPI bool IsKeyReleased(int key); // Check if a key has been released once
RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
-RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued
-RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued
+RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued. Returns 0 when the queue is empty.
+RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued. Returns 0 when the queue is empty.
// Input-related functions: gamepads
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available