diff --git a/CMakeLists.txt b/CMakeLists.txt index ed535dc5..f3d2c9d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,7 +172,7 @@ FetchContent_Declare(implot URL https://github.com/epezent/implot/archive FetchContent_Declare(monado GIT_REPOSITORY https://gitlab.freedesktop.org/monado/monado GIT_TAG ffb71af26f8349952f5f820c268ee4774613e200 - PATCH_COMMAND patch --forward -p1 < ${CMAKE_CURRENT_LIST_DIR}/patches/monado/0001-c-multi-disable-dropping-of-old-frames.patch || true + PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${CMAKE_CURRENT_LIST_DIR}/patches/monado/ ) FetchContent_Declare(imgui diff --git a/patches/apply.sh b/patches/apply.sh new file mode 100755 index 00000000..53d51a24 --- /dev/null +++ b/patches/apply.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# There is no reliable way to apply a patch and succeed if it was +# already applied. Just ignore errors... +for f in "$@"/* ; do + patch -p1 --forward < "$f" +done + +exit 0 diff --git a/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch b/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch new file mode 100644 index 00000000..6ca60840 --- /dev/null +++ b/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch @@ -0,0 +1,25 @@ +From 289034b4c0721f348da99be047cf0e842e2dd2c9 Mon Sep 17 00:00:00 2001 +From: Patrick Nicolas +Date: Tue, 2 Apr 2024 17:14:42 +0200 +Subject: [PATCH 2/2] ipc/server: Always listen to stdin + +--- + src/xrt/ipc/server/ipc_server_mainloop_linux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/xrt/ipc/server/ipc_server_mainloop_linux.c b/src/xrt/ipc/server/ipc_server_mainloop_linux.c +index 97f1d2ca7..01552a8fe 100644 +--- a/src/xrt/ipc/server/ipc_server_mainloop_linux.c ++++ b/src/xrt/ipc/server/ipc_server_mainloop_linux.c +@@ -187,7 +187,7 @@ init_epoll(struct ipc_server_mainloop *ml) + + struct epoll_event ev = {0}; + +- if (!ml->launched_by_socket && !debug_get_bool_option_skip_stdin()) { ++ if (!debug_get_bool_option_skip_stdin()) { + // Can't do this when launched by systemd socket activation by + // default. + // This polls stdin. +-- +2.44.0 +