From eb08cd75c1f821e55a6c56eec574c058815384bc Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 10 May 2018 15:57:36 +0200 Subject: input: add a define for the number of mouse buttons and use it (Why the fuck are there up to 20 mouse buttons?) --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/command.c b/player/command.c index cc8b609c50..60fb7447e1 100644 --- a/player/command.c +++ b/player/command.c @@ -5757,7 +5757,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; -- cgit v1.2.3