summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authordudemanguy <random342@airmail.cc>2019-12-02 09:11:06 -0600
committerDudemanguy <random342@airmail.cc>2019-12-04 00:47:05 +0000
commit65a317436df05000366af2738bdbb834e95e33db (patch)
treec57e664163e17d8acc7797015faaf2a41eb0d7e0 /player/playloop.c
parentfd28be400cbee01ea37aec07ea23480aae90e06b (diff)
downloadmpv-65a317436df05000366af2738bdbb834e95e33db.tar.bz2
mpv-65a317436df05000366af2738bdbb834e95e33db.tar.xz
options: move cursor autohiding opts to mp_vo_opts
Certain backends (i.e. wayland) will need to do special things with the mouse. It makes sense to expose the values of these options to them, so they can behave correctly.
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 0e0c09654d..3a7b2d193c 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -804,7 +804,7 @@ static void handle_cursor_autohide(struct MPContext *mpctx)
unsigned mouse_event_ts = mp_input_get_mouse_event_counter(mpctx->input);
if (mpctx->mouse_event_ts != mouse_event_ts) {
mpctx->mouse_event_ts = mouse_event_ts;
- mpctx->mouse_timer = now + opts->cursor_autohide_delay / 1000.0;
+ mpctx->mouse_timer = now + vo->opts->cursor_autohide_delay / 1000.0;
mouse_cursor_visible = true;
}
@@ -814,13 +814,13 @@ static void handle_cursor_autohide(struct MPContext *mpctx)
mouse_cursor_visible = false;
}
- if (opts->cursor_autohide_delay == -1)
+ if (vo->opts->cursor_autohide_delay == -1)
mouse_cursor_visible = true;
- if (opts->cursor_autohide_delay == -2)
+ if (vo->opts->cursor_autohide_delay == -2)
mouse_cursor_visible = false;
- if (opts->cursor_autohide_fs && !opts->vo->fullscreen)
+ if (vo->opts->cursor_autohide_fs && !opts->vo->fullscreen)
mouse_cursor_visible = true;
if (mouse_cursor_visible != mpctx->mouse_cursor_visible)