diff options
author | Dudemanguy <random342@airmail.cc> | 2022-11-11 13:57:53 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-11-15 15:31:21 +0000 |
commit | 38a626650ae9662f583d8a81cbefc4892c0e6dcf (patch) | |
tree | b562322d935454479b74e5fc1bed52300cefd229 /video/out | |
parent | 295ceab3820b07ad92f95f318b102fec957dd4e3 (diff) | |
download | mpv-38a626650ae9662f583d8a81cbefc4892c0e6dcf.tar.bz2 mpv-38a626650ae9662f583d8a81cbefc4892c0e6dcf.tar.xz |
player: add --force-render option
mpv has an internal optimization on a couple of platforms where it will
not render any frames if the window is minimized or hidden. There's at
least once possible use case for wanting to force a render anyway
(screensharing with pipeware) so let's just add a simple switch for
this that always forces mpv to render. Closes #10846.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/wayland_common.c | 2 | ||||
-rw-r--r-- | video/out/x11_common.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 18d9bba450..53854c2465 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1754,7 +1754,7 @@ int vo_wayland_allocate_memfd(struct vo *vo, size_t size) bool vo_wayland_check_visible(struct vo *vo) { struct vo_wayland_state *wl = vo->wl; - bool render = !wl->hidden || wl->opts->disable_vsync; + bool render = !wl->hidden || wl->vo_opts->force_render; wl->frame_wait = true; return render; } diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 2ca2ea6574..5dc844da4d 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1972,7 +1972,8 @@ bool vo_x11_check_visible(struct vo *vo) { struct vo_x11_state *x11 = vo->x11; struct mp_vo_opts *opts = x11->opts; - bool render = !x11->hidden || VS_IS_DISP(opts->video_sync); + bool render = !x11->hidden || opts->force_render || + VS_IS_DISP(opts->video_sync); return render; } |