mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
command: allow changing some VO options even if VO wasn't created yet
Instead of refusing to set properties like "fullscreen" if no VO was created, always allow it. So if no VO is created, setting the property merely changes the options (and will be applied once the VO is created). This is consistent with similar behavior changes to some other properties. Improves the behavior reported in #1676. Also, we shouldn't check the config_ok variable - the VO should do this.
This commit is contained in:
parent
ca474d22c9
commit
e9841630ad
@ -2310,15 +2310,15 @@ 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 (!mpctx->video_out)
|
||||
return M_PROPERTY_UNAVAILABLE;
|
||||
|
||||
if (action == M_PROPERTY_SET) {
|
||||
int desired = !!*(int *) arg;
|
||||
if (*vo_var == desired)
|
||||
return M_PROPERTY_OK;
|
||||
if (mpctx->video_out->config_ok)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user