summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-30 23:50:57 +0200
committerwm4 <wm4@nowhere>2016-08-30 23:50:57 +0200
commitaf1379c43d6a5274b75bce0adeef9e3a9ce87bdf (patch)
treeba90dc6c885374095a1051c8dde7f983eca7b7e9 /player/command.c
parente65a8d7b61762ddf07825c59a6ebd47b026b0ea7 (diff)
downloadmpv-af1379c43d6a5274b75bce0adeef9e3a9ce87bdf.tar.bz2
mpv-af1379c43d6a5274b75bce0adeef9e3a9ce87bdf.tar.xz
options: make mp_vo_opts options an actual sub-option group
Just a minor refactor along the planned option change. This commit will make it easier to update (i.e. copy) the VO options without copying _all_ options. For now, behavior should be equivalent, though. (The VO options were put into a separate struct quite early - when all global variables were removed from the source code. It wasn't clear whether the separate struct would have any actual purpose, but it seems it will now. Awesome, huh.)
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/player/command.c b/player/command.c
index 1c59d130ce..a59fa059b8 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2371,10 +2371,10 @@ static int mp_property_fullscreen(void *ctx, struct m_property *prop,
int action, void *arg)
{
MPContext *mpctx = ctx;
- int oldval = mpctx->opts->vo.fullscreen;
+ int oldval = mpctx->opts->vo->fullscreen;
int r = mp_property_vo_flag(prop, action, arg, VOCTRL_FULLSCREEN,
- &mpctx->opts->vo.fullscreen, mpctx);
- if (oldval && oldval != mpctx->opts->vo.fullscreen)
+ &mpctx->opts->vo->fullscreen, mpctx);
+ if (oldval && oldval != mpctx->opts->vo->fullscreen)
mpctx->mouse_event_ts--; // Show mouse cursor
return r;
}
@@ -2386,9 +2386,9 @@ static int mp_property_taskbar_progress(void *ctx, struct m_property *prop,
MPContext *mpctx = ctx;
if (action == M_PROPERTY_SET) {
int desired = !!*(int *) arg;
- if (mpctx->opts->vo.taskbar_progress == desired)
+ if (mpctx->opts->vo->taskbar_progress == desired)
return M_PROPERTY_OK;
- mpctx->opts->vo.taskbar_progress = desired;
+ mpctx->opts->vo->taskbar_progress = desired;
if (mpctx->video_out)
update_vo_playback_state(mpctx);
return M_PROPERTY_OK;
@@ -2402,7 +2402,7 @@ static int mp_property_ontop(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
return mp_property_vo_flag(prop, action, arg, VOCTRL_ONTOP,
- &mpctx->opts->vo.ontop, mpctx);
+ &mpctx->opts->vo->ontop, mpctx);
}
/// Show window borders (RW)
@@ -2411,7 +2411,7 @@ static int mp_property_border(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
return mp_property_vo_flag(prop, action, arg, VOCTRL_BORDER,
- &mpctx->opts->vo.border, mpctx);
+ &mpctx->opts->vo->border, mpctx);
}
static int mp_property_all_workspaces(void *ctx, struct m_property *prop,
@@ -2419,7 +2419,7 @@ static int mp_property_all_workspaces(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
return mp_property_vo_flag(prop, action, arg, VOCTRL_ALL_WORKSPACES,
- &mpctx->opts->vo.all_workspaces, mpctx);
+ &mpctx->opts->vo->all_workspaces, mpctx);
}
static int get_frame_count(struct MPContext *mpctx)