Commit 9bd7a6e2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Even Laurent makes horrible mistakes sometimes ;)

parent b015aa32
...@@ -44,51 +44,51 @@ ...@@ -44,51 +44,51 @@
static inline void vout_SendEventClose(vout_thread_t *vout) static inline void vout_SendEventClose(vout_thread_t *vout)
{ {
/* Ask to stop /* Ask to stop
* FIXME works only for input handled by the playlist * FIXME works only for input handled by the playlist
*/ */
playlist_t *playlist = pl_Hold(vout); playlist_t *playlist = pl_Hold(vout);
if (playlist) { if (playlist) {
playlist_Stop(playlist); playlist_Stop(playlist);
pl_Release(vout); pl_Release(vout);
} }
} }
static inline void vout_SendEventKey(vout_thread_t *vout, int key) static inline void vout_SendEventKey(vout_thread_t *vout, int key)
{ {
var_SetInteger(vout->p_libvlc, "key-pressed", key); var_SetInteger(vout->p_libvlc, "key-pressed", key);
} }
static inline void vout_SendEventMouseMoved(vout_thread_t *vout, int x, int y) static inline void vout_SendEventMouseMoved(vout_thread_t *vout, int x, int y)
{ {
var_SetInteger(vout, "mouse-x", x); var_SetInteger(vout, "mouse-x", x);
var_SetInteger(vout, "mouse-y", y); var_SetInteger(vout, "mouse-y", y);
var_SetBool(vout, "mouse-moved", true); var_SetBool(vout, "mouse-moved", true);
} }
static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button) static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
{ {
int current = var_GetInteger(vout, "mouse-button-down"); int current = var_GetInteger(vout, "mouse-button-down");
current |= 1 << button; current |= 1 << button;
var_SetInteger(vout, "mouse-button-down", current); var_SetInteger(vout, "mouse-button-down", current);
switch (button) switch (button)
{ {
case MOUSE_BUTTON_LEFT: case MOUSE_BUTTON_LEFT:
var_SetBool(vout, "mouse-clicked", true); var_SetBool(vout, "mouse-clicked", true);
var_SetBool(vout->p_libvlc, "intf-popupmenu", false); var_SetBool(vout->p_libvlc, "intf-popupmenu", false);
break; break;
case MOUSE_BUTTON_CENTER: case MOUSE_BUTTON_CENTER:
var_SetBool(vout->p_libvlc, "intf-show", var_SetBool(vout->p_libvlc, "intf-show",
!var_GetBool(vout->p_libvlc, "intf-show")); !var_GetBool(vout->p_libvlc, "intf-show"));
break; break;
case MOUSE_BUTTON_RIGHT: case MOUSE_BUTTON_RIGHT:
var_SetBool(vout->p_libvlc, "intf-popupmenu", true); var_SetBool(vout->p_libvlc, "intf-popupmenu", true);
break; break;
} }
} }
static inline void vout_SendEventMouseReleased(vout_thread_t *vout, int button) static inline void vout_SendEventMouseReleased(vout_thread_t *vout, int button)
{ {
int current = var_GetInteger(vout, "mouse-button-down"); int current = var_GetInteger(vout, "mouse-button-down");
current &= ~(1 << button); current &= ~(1 << button);
var_SetInteger(vout, "mouse-button-down", current); var_SetInteger(vout, "mouse-button-down", current);
} }
static inline void vout_SendEventMouseDoubleClick(vout_thread_t *vout) static inline void vout_SendEventMouseDoubleClick(vout_thread_t *vout)
{ {
......
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