diff options
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/player/command.c b/player/command.c index a59fa059b8..7a6820af3e 100644 --- a/player/command.c +++ b/player/command.c @@ -2352,18 +2352,13 @@ static int panscan_property_helper(void *ctx, struct m_property *prop, static int mp_property_vo_flag(struct m_property *prop, int action, void *arg, int vo_ctrl, int *vo_var, MPContext *mpctx) { - if (action == M_PROPERTY_SET) { - int desired = !!*(int *) arg; - if (*vo_var == desired) - return M_PROPERTY_OK; - if (mpctx->video_out) { + int old = *vo_var; + int res = mp_property_generic_option(mpctx, prop, action, arg); + if (action == M_PROPERTY_SET && old != *vo_var) { + if (mpctx->video_out) vo_control(mpctx->video_out, vo_ctrl, 0); - } else { - *vo_var = desired; - } - return *vo_var == desired ? M_PROPERTY_OK : M_PROPERTY_ERROR; } - return mp_property_generic_option(mpctx, prop, action, arg); + return res; } /// Fullscreen state (RW) |