summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-08 02:07:20 +0200
committerwm4 <wm4@nowhere>2013-09-08 03:03:58 +0200
commit0509532d702e53ec77e47c38a3c92575a8843dcb (patch)
tree0e2119dd0d1a9ed2f598099ca8dff389ca9e10c9 /mpvcore
parentf1b5198b35285111c3084c8d53d69194a5fc08e0 (diff)
downloadmpv-0509532d702e53ec77e47c38a3c92575a8843dcb.tar.bz2
mpv-0509532d702e53ec77e47c38a3c92575a8843dcb.tar.xz
options: cosmetics: move cursor_autohide_delay definition
No functional changes.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/mplayer.c8
-rw-r--r--mpvcore/options.c4
-rw-r--r--mpvcore/options.h3
3 files changed, 8 insertions, 7 deletions
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;