diff options
author | wm4 <wm4@nowhere> | 2019-11-25 20:17:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-25 20:29:43 +0100 |
commit | 78bb1586d34bcd0cf89267d9447a9cef6ef29761 (patch) | |
tree | 2f5354701dc467e3d49abd3eec483a913ecb9a79 /player/playloop.c | |
parent | fba7c69b8afe7a2c06f14b7fc96b53b1a55819cf (diff) | |
download | mpv-78bb1586d34bcd0cf89267d9447a9cef6ef29761.tar.bz2 mpv-78bb1586d34bcd0cf89267d9447a9cef6ef29761.tar.xz |
command: shuffle around even more crap
Convert some remaining properties to work without the option-to-property
bridge. Behavior shouldn't change (except for the corner case that it
tries to reapply the new state when setting a property, while it used to
ignore redundant sets).
As it is the case with many of these changes, much of the code is not in
its final proper state yet, but is rather a temporary workaround. For
example, these "VO flag" properties should just be fully handled in the
VO backend. (Currently, the config or VO layers don't provide enough
mechanism yet as that all the backends like x11, win32, etc. could be
changed yet, but that's another refactoring mess for another time.)
Now nothing relies on this option-to-property bridge anymore, which
opens the way to even more refactoring, which eventually may result in
tiny improvements for the end user.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/player/playloop.c b/player/playloop.c index ab98fb1a60..907a732a01 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -840,10 +840,13 @@ static void handle_vo_events(struct MPContext *mpctx) if (events & VO_EVENT_FULLSCREEN_STATE) { // The only purpose of this is to update the fullscreen flag on the // playloop side if it changes "from outside" on the VO. - int fs = mpctx->opts->vo->fullscreen; + int old_fs = mpctx->opts->vo->fullscreen; + int fs = old_fs; vo_control(vo, VOCTRL_GET_FULLSCREEN, &fs); - m_config_set_option_raw_direct(mpctx->mconfig, - m_config_get_co(mpctx->mconfig, bstr0("fullscreen")), &fs, 0); + if (old_fs != fs) { + m_config_set_option_raw_direct(mpctx->mconfig, + m_config_get_co(mpctx->mconfig, bstr0("fullscreen")), &fs, 0); + } } } |