[vlc-devel] [PATCH] hotkeys: fix mouse wheel down event
Victorien Le Couviour--Tuffet
victorien.lecouviour.tuffet at gmail.com
Tue Nov 27 13:26:37 CET 2018
---
modules/control/hotkeys.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 6c60deaf09..6217150f4b 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -201,8 +201,11 @@ static int ButtonEvent( vlc_object_t *p_this, char const *psz_var,
for (int i = MOUSE_BUTTON_WHEEL_UP; i <= MOUSE_BUTTON_WHEEL_RIGHT; i++)
if (pressed & (1 << i))
- var_SetInteger(p_intf->obj.libvlc, "key-pressed",
- i - MOUSE_BUTTON_WHEEL_UP + KEY_MOUSEWHEELUP);
+ {
+ int keycode =
+ KEY_MOUSEWHEELUP + ((i - MOUSE_BUTTON_WHEEL_UP) << 16);
+ var_SetInteger(p_intf->obj.libvlc, "key-pressed", keycode);
+ }
return VLC_SUCCESS;
}
--
2.19.1
More information about the vlc-devel
mailing list