diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-25 16:13:57 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-25 16:13:57 +0000 |
commit | 14c018a80f4908a6540e76e08047dcbf6d9dc059 (patch) | |
tree | 37cc35c4d060727a66a696bc677689bf6fda4c78 /libvo/vo_corevideo.m | |
parent | 38505822c7914c60fbbd003f00c4176500547444 (diff) | |
download | mpv-14c018a80f4908a6540e76e08047dcbf6d9dc059.tar.bz2 mpv-14c018a80f4908a6540e76e08047dcbf6d9dc059.tar.xz |
Avoid duplicating mouse-movement command-generation code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31091 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_corevideo.m')
-rw-r--r-- | libvo/vo_corevideo.m | 7 |
1 files changed, 2 insertions, 5 deletions
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); } } } |