diff options
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index f811a8ea06..25e3aa1168 100644 --- a/player/command.c +++ b/player/command.c @@ -2566,6 +2566,18 @@ static int mp_property_sub_pos(void *ctx, struct m_property *prop, return property_osd_helper(mpctx, prop, action, arg); } +static int mp_property_cursor_autohide(void *ctx, struct m_property *prop, + int action, void *arg) +{ + MPContext *mpctx = ctx; + struct MPOpts *opts = mpctx->opts; + int old_value = opts->cursor_autohide_delay; + int r = mp_property_generic_option(mpctx, prop, action, arg); + if (opts->cursor_autohide_delay != old_value) + mpctx->mouse_timer = 0; + return r; +} + static int prop_stream_ctrl(struct MPContext *mpctx, int ctrl, void *arg) { if (!mpctx->demuxer) @@ -3080,6 +3092,8 @@ static const struct m_property mp_properties[] = { {"tv-channel", mp_property_tv_channel}, {"dvb-channel", mp_property_dvb_channel}, + {"cursor-autohide", mp_property_cursor_autohide}, + #define TRACK_FF(name, type) \ {name, property_switch_track_ff, (void *)(intptr_t)type} TRACK_FF("ff-vid", STREAM_VIDEO), |