From 14c018a80f4908a6540e76e08047dcbf6d9dc059 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 25 Apr 2010 16:13:57 +0000 Subject: Avoid duplicating mouse-movement command-generation code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31091 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_corevideo.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libvo/vo_corevideo.m') diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index d6bb83e9ec..568fd7b802 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -953,11 +953,8 @@ static int control(uint32_t request, void *data, ...) if (enable_mouse_movements && !isRootwin) { NSPoint p =[self convertPoint:[theEvent locationInWindow] fromView:nil]; if ([self mouse:p inRect:textureFrame]) { - char cmdstr[40]; - snprintf(cmdstr, sizeof(cmdstr), "set_mouse_pos %i %i", - (int)(vo_fs ? p.x : (p.x - textureFrame.origin.x)), - (int)(vo_fs ? [self frame].size.height - p.y: (NSMaxY(textureFrame) - p.y))); - mp_input_queue_cmd(mp_input_parse_cmd(cmdstr)); + vo_mouse_movement(vo_fs ? p.x : p.x - textureFrame.origin.x, + vo_fs ? [self frame].size.height - p.y : NSMaxY(textureFrame) - p.y); } } } -- cgit v1.2.3