diff options
author | wm4 <wm4@nowhere> | 2014-07-27 21:33:11 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-27 21:33:11 +0200 |
commit | 89391e7c949216d7edec461e9bb2cb6c787475c6 (patch) | |
tree | 0607c4609ffe505f810403585d54c8fa233e164f /video/out/vo.c | |
parent | bc6359313f55ef42e2e4737323844a224f17730b (diff) | |
download | mpv-89391e7c949216d7edec461e9bb2cb6c787475c6.tar.bz2 mpv-89391e7c949216d7edec461e9bb2cb6c787475c6.tar.xz |
vo: different hack for VOs which need to mangle mouse input
Follow up on commit 760548da. Mouse handling is a bit confusing, because
there are at least 3 coordinate systems associated with it, and it
should be cleaned up. But that is hard, so just apply a hack which gets
the currently-annoying issue (VO backends needing access to the VO) out
of the way.
Diffstat (limited to 'video/out/vo.c')
-rw-r--r-- | video/out/vo.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index f7dafa2735..db6a97eb26 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -177,6 +177,7 @@ static struct vo *vo_create(struct mpv_global *global, .max_video_queue = 1, }; talloc_steal(vo, log); + mp_input_set_mouse_transform(vo->input_ctx, NULL, NULL); if (vo->driver->encode != !!vo->encode_lavc_ctx) goto error; struct m_config *config = m_config_from_obj_desc(vo, vo->log, &desc); @@ -415,10 +416,7 @@ void vo_mouse_movement(struct vo *vo, int posx, int posy) { if (!vo->opts->enable_mouse_movements) return; - float p[2] = {posx, posy}; - if (vo->driver->caps & VO_CAP_EVIL_OSD) - vo_control(vo, VOCTRL_WINDOW_TO_OSD_COORDS, p); - mp_input_set_mouse_pos(vo->input_ctx, p[0], p[1]); + mp_input_set_mouse_pos(vo->input_ctx, posx, posy); } /** |