summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRichard Smith <[email protected]>2021-10-23 09:52:04 +0100
committerGitHub <[email protected]>2021-10-23 10:52:04 +0200
commitfcc6a61d9e92bc392d2afb4baaa257befed32b2a (patch)
treee7a0605b900132f1ec821348de2359bb4d88c126 /src
parentae13f438bae66ad3ddb7323addbbe54d1a68adec (diff)
downloadraylib-fcc6a61d9e92bc392d2afb4baaa257befed32b2a.tar.gz
raylib-fcc6a61d9e92bc392d2afb4baaa257befed32b2a.zip
replace hardcoded number of mouse buttons with MAX_MOUSE_BUTTONS (#2076)
Diffstat (limited to 'src')
-rw-r--r--src/rcore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rcore.c b/src/rcore.c
index 642a360e..e3e20d21 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -4718,7 +4718,7 @@ void PollInputEvents(void)
// Register previous mouse states
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;
CORE.Input.Mouse.currentWheelMove = 0.0f;
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < MAX_MOUSE_BUTTONS; i++)
{
CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
CORE.Input.Mouse.currentButtonState[i] = CORE.Input.Mouse.currentButtonStateEvdev[i];
@@ -4742,7 +4742,7 @@ void PollInputEvents(void)
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.previousKeyState[i] = CORE.Input.Keyboard.currentKeyState[i];
// Register previous mouse states
- for (int i = 0; i < 3; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
+ for (int i = 0; i < MAX_MOUSE_BUTTONS; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
// Register previous mouse wheel state
CORE.Input.Mouse.previousWheelMove = CORE.Input.Mouse.currentWheelMove;