summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-10-07 08:41:47 -0500
committerDudemanguy <random342@airmail.cc>2020-10-07 08:41:47 -0500
commit5dc16a4a183d51736cc56b4ef0a6b91a7b56fa09 (patch)
treea8c55afec447edfaf34e7e8ea177b44e072fd46c /video
parent015b6768759c8bd8cc815be01123ef95c192f3c5 (diff)
downloadmpv-5dc16a4a183d51736cc56b4ef0a6b91a7b56fa09.tar.bz2
mpv-5dc16a4a183d51736cc56b4ef0a6b91a7b56fa09.tar.xz
Revert "wayland: add wayland-display-socket option"
Pointless feature that can be done with environment variables. It was also implemented incorrectly and broke autoprobing. This reverts commit 015b6768759c8bd8cc815be01123ef95c192f3c5.
Diffstat (limited to 'video')
-rw-r--r--video/out/wayland_common.c13
-rw-r--r--video/out/wayland_common.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index d3fbc22dcb..eb1e0f8c21 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -46,7 +46,6 @@
const struct m_sub_options wayland_conf = {
.opts = (const struct m_option[]) {
{"wayland-disable-vsync", OPT_FLAG(disable_vsync)},
- {"wayland-display-socket", OPT_STRING(display_socket)},
{"wayland-edge-pixels-pointer", OPT_INT(edge_pixels_pointer),
M_RANGE(0, INT_MAX)},
{"wayland-edge-pixels-touch", OPT_INT(edge_pixels_touch),
@@ -56,7 +55,6 @@ const struct m_sub_options wayland_conf = {
.size = sizeof(struct wayland_opts),
.defaults = &(struct wayland_opts) {
.disable_vsync = false,
- .display_socket = NULL,
.edge_pixels_pointer = 10,
.edge_pixels_touch = 64,
},
@@ -1127,6 +1125,7 @@ int vo_wayland_init(struct vo *vo)
struct vo_wayland_state *wl = vo->wl;
*wl = (struct vo_wayland_state) {
+ .display = wl_display_connect(NULL),
.vo = vo,
.log = mp_log_new(wl, vo->log, "wayland"),
.scaling = 1,
@@ -1135,16 +1134,8 @@ int vo_wayland_init(struct vo *vo)
.cursor_visible = true,
.vo_opts_cache = m_config_cache_alloc(wl, vo->global, &vo_sub_opts),
};
- wl->opts = mp_get_config_group(wl, wl->vo->global, &wayland_conf);
wl->vo_opts = wl->vo_opts_cache->opts;
- wl->display = wl_display_connect(wl->opts->display_socket);
- if (!wl->display) {
- MP_WARN(wl, "Display socket %s not found/unavailable! Falling back to NULL!\n", wl->opts->display_socket);
- wl->display = wl_display_connect(NULL);
- }
- wl->display_fd = wl_display_get_fd(wl->display);
-
wl_list_init(&wl->output_list);
if (!wl->display)
@@ -1213,6 +1204,8 @@ int vo_wayland_init(struct vo *vo)
MP_VERBOSE(wl, "Compositor doesn't support the %s protocol!\n",
zwp_idle_inhibit_manager_v1_interface.name);
+ wl->opts = mp_get_config_group(wl, wl->vo->global, &wayland_conf);
+ wl->display_fd = wl_display_get_fd(wl->display);
mp_make_wakeup_pipe(wl->wakeup_pipe);
return true;
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index ec8dc83c97..27f4f87b0e 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -27,7 +27,6 @@
struct wayland_opts {
int disable_vsync;
- char *display_socket;
int edge_pixels_pointer;
int edge_pixels_touch;
};