Commit 938d8c45 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove useless mouse buttons table

parent 365bb633
......@@ -25,15 +25,16 @@
#define _VLC_MOUSE_H 1
/**
* Mouse button
* Mouse buttons
*/
enum
{
MOUSE_BUTTON_LEFT,
MOUSE_BUTTON_LEFT=0,
MOUSE_BUTTON_CENTER,
MOUSE_BUTTON_RIGHT,
MOUSE_BUTTON_WHEEL_UP,
MOUSE_BUTTON_WHEEL_DOWN,
MOUSE_BUTTON_MAX
};
/**
......
......@@ -1627,16 +1627,7 @@ void vout_SendDisplayEventMouse(vout_thread_t *vout, const vlc_mouse_t *m)
vout_SendEventMouseMoved(vout, m->i_x, m->i_y);
}
if (vlc_mouse_HasButton(&vout->p->mouse, m)) {
static const int buttons[] = {
MOUSE_BUTTON_LEFT,
MOUSE_BUTTON_CENTER,
MOUSE_BUTTON_RIGHT,
MOUSE_BUTTON_WHEEL_UP,
MOUSE_BUTTON_WHEEL_DOWN,
-1
};
for (int i = 0; buttons[i] >= 0; i++) {
const int button = buttons[i];
for (unsigned button = 0; button < MOUSE_BUTTON_MAX; button++) {
if (vlc_mouse_HasPressed(&vout->p->mouse, m, button))
vout_SendEventMousePressed(vout, button);
else if (vlc_mouse_HasReleased(&vout->p->mouse, m, button))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment