From 0509532d702e53ec77e47c38a3c92575a8843dcb Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 8 Sep 2013 02:07:20 +0200 Subject: options: cosmetics: move cursor_autohide_delay definition No functional changes. --- mpvcore/mplayer.c | 8 ++++---- mpvcore/options.c | 4 ++-- mpvcore/options.h | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'mpvcore') diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index ad1bae476b..3a2b65b31c 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -2402,7 +2402,7 @@ int reinit_video_chain(struct MPContext *mpctx) "the selected video_out (-vo) device.\n"); goto err_out; } - if (opts->vo.cursor_autohide_delay != -1) { + if (opts->cursor_autohide_delay != -1) { vo_control(mpctx->video_out, VOCTRL_SET_CURSOR_VISIBILITY, &(bool){false}); } @@ -3457,12 +3457,12 @@ static void run_playloop(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; - if (opts->vo.cursor_autohide_delay > -1) { + if (opts->cursor_autohide_delay > -1) { vo_control(vo, VOCTRL_SET_CURSOR_VISIBILITY, &(bool){true}); - if (opts->vo.cursor_autohide_delay >= 0) { + if (opts->cursor_autohide_delay >= 0) { mpctx->mouse_waiting_hide = 1; mpctx->mouse_timer = - mp_time_sec() + opts->vo.cursor_autohide_delay / 1000.0; + mp_time_sec() + opts->cursor_autohide_delay / 1000.0; } } } diff --git a/mpvcore/options.c b/mpvcore/options.c index c63aa7342a..b84c0d4999 100644 --- a/mpvcore/options.c +++ b/mpvcore/options.c @@ -604,7 +604,7 @@ const m_option_t mp_opts[] = { {"limited", MP_CSP_LEVELS_TV}, {"full", MP_CSP_LEVELS_PC})), - OPT_CHOICE_OR_INT("cursor-autohide", vo.cursor_autohide_delay, 0, + OPT_CHOICE_OR_INT("cursor-autohide", cursor_autohide_delay, 0, 0, 30000, ({"no", -1}, {"always", -2})), OPT_FLAG("stop-screensaver", stop_screensaver, 0), @@ -753,7 +753,6 @@ const struct MPOpts mp_default_opts = { .volstep = 3, .vo = { .video_driver_list = NULL, - .cursor_autohide_delay = 1000, .monitor_pixel_aspect = 1.0, .screen_id = -1, .fsscreen_id = -1, @@ -768,6 +767,7 @@ const struct MPOpts mp_default_opts = { .wintitle = "mpv - ${media-title}", .heartbeat_interval = 30.0, .stop_screensaver = 1, + .cursor_autohide_delay = 1000, .gamma_gamma = 1000, .gamma_brightness = 1000, .gamma_contrast = 1000, diff --git a/mpvcore/options.h b/mpvcore/options.h index cac2630040..99291b9a38 100644 --- a/mpvcore/options.h +++ b/mpvcore/options.h @@ -34,7 +34,6 @@ typedef struct mp_vo_opts { int nomouse_input; int enable_mouse_movements; - int cursor_autohide_delay; int64_t WinID; @@ -70,6 +69,8 @@ typedef struct MPOpts { int gamma_hue; int stop_screensaver; + int cursor_autohide_delay; + int requested_colorspace; int requested_input_range; int requested_output_range; -- cgit v1.2.3