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.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 92dfcf47b6..25a988e4f1 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -34,6 +34,7 @@
#include "aspect.h"
#include "geometry.h"
#include "old_vo_wrapper.h"
+#include "input/input.h"
#include "mp_msg.h"
@@ -478,7 +479,7 @@ int vo_config(struct vo *vo, uint32_t width, uint32_t height,
* \result translation corresponding to key or "to" value of last mapping
* if not found.
*/
-int lookup_keymap_table(const struct keymap *map, int key) {
+int lookup_keymap_table(const struct mp_keymap *map, int key) {
while (map->from && map->from != key) map++;
return map->to;
}
@@ -555,6 +556,22 @@ void calc_src_dst_rects(struct vo *vo, int src_width, int src_height,
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(struct vo *vo, 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(vo->input_ctx, mp_input_parse_cmd(cmd_str));
+}
+
#if defined(CONFIG_FBDEV) || defined(CONFIG_VESA)
/* Borrowed from vo_fbdev.c
Monitor ranges related functions*/