summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r--libvo/video_out.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index c1786d27ba..fdb75ba8fb 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -446,6 +446,21 @@ void calc_src_dst_rects(int src_width, int src_height, struct vo_rect *src, stru
dst->height = dst->bottom - dst->top;
}
+/**
+ * Generates a mouse movement message if those are enable and sends it
+ * to the "main" MPlayer.
+ *
+ * \param posx new x position of mouse
+ * \param posy new y position of mouse
+ */
+void vo_mouse_movement(int posx, int posy) {
+ char cmd_str[40];
+ if (!enable_mouse_movements)
+ return;
+ snprintf(cmd_str, sizeof(cmd_str), "set_mouse_pos %i %i", posx, posy);
+ mp_input_queue_cmd(mp_input_parse_cmd(cmd_str));
+}
+
#if defined(CONFIG_FBDEV) || defined(CONFIG_VESA)
/* Borrowed from vo_fbdev.c
Monitor ranges related functions*/