mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
wayland: create current_output in wayland_reconfig
Certain mpv config options require wl->current_output to be created before the video can actually start rendering. Just always create it here if the current_output doesn't exist (the one exception being the --fs option with no --fs-screen flag). Incidentally, this also fixes --fs-screen not working on wayland.
This commit is contained in:
parent
61b46d101e
commit
0f938b197a
@ -1213,11 +1213,12 @@ int vo_wayland_reconfig(struct vo *vo)
|
|||||||
|
|
||||||
MP_VERBOSE(wl, "Reconfiguring!\n");
|
MP_VERBOSE(wl, "Reconfiguring!\n");
|
||||||
|
|
||||||
/* Surface enter events happen later but we already know the outputs and we'd
|
/* Surface enter events happen later but certain config options require the
|
||||||
* like to know the output the surface would be on (for scaling or fullscreen),
|
* current_output to be created in order for the video to actually render.
|
||||||
* so if fsscreen_id is set or there's only one possible output, use it. */
|
* Only skip this if --fs is specified without a fsscreen_id so the video
|
||||||
if (((!wl->current_output) && (wl_list_length(&wl->output_list) == 1)) ||
|
* renders on the same screen and not the one with idx 0. */
|
||||||
(vo->opts->fullscreen && (vo->opts->fsscreen_id >= 0))) {
|
if ((!wl->current_output) &&
|
||||||
|
!(vo->opts->fullscreen && (vo->opts->fsscreen_id < 0))) {
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
if (vo->opts->fullscreen && (vo->opts->fsscreen_id >= 0))
|
if (vo->opts->fullscreen && (vo->opts->fsscreen_id >= 0))
|
||||||
idx = vo->opts->fsscreen_id;
|
idx = vo->opts->fsscreen_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user