From afc264e84620b7277bc7c4659dd6cc1e9343eb55 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 1 Mar 2019 21:41:32 +1100 Subject: [PATCH] [c-host] linux: added initial stubs for XCB capture --- c-host/Makefile | 6 ++++++ c-host/capture/interfaces.h | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/c-host/Makefile b/c-host/Makefile index 492d42a5..90dd34ec 100644 --- a/c-host/Makefile +++ b/c-host/Makefile @@ -1,4 +1,5 @@ USE_DXGI ?= 1 +USE_XCB ?= 1 OUTPUT = looking-glass-host EXT = @@ -30,6 +31,11 @@ else CC = gcc OBJS += linux/platform.o LIBS += -lpthread + + ifeq ($(USE_XCB), 1) + CFLAGS += -DUSE_XCB + OBJS += linux/capture/xcb.o + endif endif all: $(OBJS) $(DLLS) diff --git a/c-host/capture/interfaces.h b/c-host/capture/interfaces.h index 3818b6f8..24b581d2 100644 --- a/c-host/capture/interfaces.h +++ b/c-host/capture/interfaces.h @@ -23,10 +23,17 @@ Place, Suite 330, Boston, MA 02111-1307 USA struct CaptureInterface Capture_DXGI; #endif +#if defined(USE_XCB) +struct CaptureInterface Capture_XCB; +#endif + struct CaptureInterface * CaptureInterfaces[] = { #if defined(USE_DXGI) &Capture_DXGI, +#endif +#if defined(USE_XCB) + &Capture_XCB, #endif NULL }; \ No newline at end of file