summaryrefslogtreecommitdiffstats
path: root/video/out/vo.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-29 12:50:50 +0100
committerwm4 <wm4@nowhere>2019-11-29 13:56:58 +0100
commit4e4252f9169edc00c747ffc66fe0b627bbca7ba7 (patch)
treef3a9c199efe81493bfdaf97f1b0af39782afa962 /video/out/vo.c
parentb16cea750f527088be79772e7cd601f86ce62ef2 (diff)
downloadmpv-4e4252f9169edc00c747ffc66fe0b627bbca7ba7.tar.bz2
mpv-4e4252f9169edc00c747ffc66fe0b627bbca7ba7.tar.xz
x11: use new option stuff to implement fullscreen
- remove VOCTRL_FULLSCREEN and VOCTRL_GET_FULLSCREEN - have your own m_config_cache for the fullscreen option (vo->opts_cache cannot be used because you lose per-option change notifications, and it'd be a mess anyway) - use VOCTRL_VO_OPTS_CHANGED to update it (it's used for convenience) - when updating it, check for the fullscreen option (wasn't sure how to do it best; currently, it compares the raw option pointers, but this could be changed) - do not send VO_EVENT_FULLSCREEN_STATE on FS change - instead write the option on FS change (assign in opt. struct + m_config_cache_write_opt)
Diffstat (limited to 'video/out/vo.c')
-rw-r--r--video/out/vo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index e28026cab5..0effc41285 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -228,9 +228,12 @@ static void update_opts(void *p)
if (m_config_cache_update(vo->opts_cache)) {
read_opts(vo);
- // "Legacy" update of video position related options.
- if (vo->driver->control)
+ if (vo->driver->control) {
+ vo->driver->control(vo, VOCTRL_VO_OPTS_CHANGED, NULL);
+ // "Legacy" update of video position related options.
+ // Unlike VOCTRL_VO_OPTS_CHANGED, often not propagated to backends.
vo->driver->control(vo, VOCTRL_SET_PANSCAN, NULL);
+ }
}
if (vo->gl_opts_cache && m_config_cache_update(vo->gl_opts_cache)) {