summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-10 15:57:36 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:34 +0200
commitcc2490ea7eb4dc1480bc26d62a3bbb15d387c35b (patch)
tree594273dbfcc150173cd432a693dccf8b4797999f /player/command.c
parentbe5e46222ba4adccc5a557375beea29d23969a81 (diff)
downloadmpv-cc2490ea7eb4dc1480bc26d62a3bbb15d387c35b.tar.bz2
mpv-cc2490ea7eb4dc1480bc26d62a3bbb15d387c35b.tar.xz
input: add a define for the number of mouse buttons and use it
(Why the fuck are there up to 20 mouse buttons?)
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 10c58e86d8..fb0180b4b0 100644
--- a/player/command.c
+++ b/player/command.c
@@ -5848,7 +5848,7 @@ static void cmd_mouse(void *p)
mp_input_set_mouse_pos_artificial(mpctx->input, x, y);
return;
}
- if (button < 0 || button >= 20) {// invalid button
+ if (button < 0 || button >= MP_KEY_MOUSE_BTN_COUNT) {// invalid button
MP_ERR(mpctx, "%d is not a valid mouse button number.\n", button);
cmd->success = false;
return;