Files
WiVRn/patches/monado/0002-Use-extern-socket-fd.patch
T
Patrick Nicolas 22a819b8c8 Implement main compositor
Replace the patches to Monado's main compositor with a local
implementation, reusing code when relevant.

The layer squasher is very close to comp_render_cs, while distortion is
completely replaced by foveation.
2026-03-31 09:06:27 +02:00

39 lines
972 B
Diff

From c0019c2e8822db5efa7d6baf51b9773cc7bdc537 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Tue, 8 Oct 2024 22:13:15 +0200
Subject: [PATCH 2/8] Use extern socket fd
---
src/xrt/ipc/server/ipc_server_mainloop_linux.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/xrt/ipc/server/ipc_server_mainloop_linux.c b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
index 777a31e96..9235375e6 100644
--- a/src/xrt/ipc/server/ipc_server_mainloop_linux.c
+++ b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
@@ -49,6 +49,8 @@
#endif
+extern int listen_socket;
+
/*
*
* Static functions.
@@ -57,6 +59,12 @@
static int
get_systemd_socket(struct ipc_server_mainloop *ml, int *out_fd)
{
+ if (listen_socket >= 0)
+ {
+ ml->launched_by_socket = true;
+ *out_fd = listen_socket;
+ return 0;
+ }
#ifdef XRT_HAVE_SYSTEMD
// We may have been launched with socket activation
int num_fds = sd_listen_fds(0);
--
2.53.0