Mercurial > mplayer.hg
diff libvo/vo_corevideo.m @ 31049:b40e41324173
Avoid duplicating mouse-movement command-generation code.
author | reimar |
---|---|
date | Sun, 25 Apr 2010 16:13:57 +0000 |
parents | 745f9833930b |
children | 3bb00f5abe8e |
line wrap: on
line diff
--- a/libvo/vo_corevideo.m Sun Apr 25 16:09:56 2010 +0000 +++ b/libvo/vo_corevideo.m Sun Apr 25 16:13:57 2010 +0000 @@ -953,11 +953,8 @@ 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); } } }