From 1ddcc7be8237f46cdfbdf493138e2d470344a0b8 Mon Sep 17 00:00:00 2001 From: orbea Date: Sat, 16 Dec 2017 05:16:27 -0800 Subject: [PATCH] Ifdef the broken dbus code better. --- Makefile.common | 2 +- gfx/common/x11_common.c | 4 ++++ griffin/griffin.c | 5 ++++- qb/config.params.sh | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index e59e968a48..b70cdb6ec3 100644 --- a/Makefile.common +++ b/Makefile.common @@ -899,7 +899,6 @@ endif ifeq ($(HAVE_X11), 1) OBJ += input/common/input_x11_common.o \ input/drivers/x11_input.o \ - gfx/common/dbus_common.o \ gfx/common/x11_common.o \ gfx/common/xinerama_common.o @@ -927,6 +926,7 @@ endif ifeq ($(HAVE_DBUS), 1) LIBS += $(DBUS_LIBS) CFLAGS += $(DBUS_CFLAGS) + OBJ += gfx/common/dbus_common.o endif ifeq ($(HAVE_UDEV), 1) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index c7894ed41d..75095a5c2a 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -40,7 +40,9 @@ #include +#ifdef HAVE_DBUS #include "dbus_common.h" +#endif #include "../../frontend/frontend_driver.h" #include "../../input/input_driver.h" @@ -604,7 +606,9 @@ bool x11_connect(void) return false; } +#ifdef HAVE_DBUS dbus_ensure_connection(); +#endif return true; } diff --git a/griffin/griffin.c b/griffin/griffin.c index dab466aaa0..060da11798 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -251,9 +251,12 @@ VIDEO CONTEXT #if defined(HAVE_X11) #include "../gfx/common/x11_common.c" -#include "../gfx/common/dbus_common.c" #include "../gfx/common/xinerama_common.c" +#ifdef HAVE_DBUS +#include "../gfx/common/dbus_common.c" +#endif + #ifndef HAVE_OPENGLES #include "../gfx/drivers_context/x_ctx.c" #endif diff --git a/qb/config.params.sh b/qb/config.params.sh index 53612d047f..9d20ca8c79 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -18,7 +18,7 @@ HAVE_SDL2=auto # SDL2 support (disables SDL 1.x) C89_SDL2=no HAVE_LIBUSB=auto # Libusb HID support C89_LIBUSB=no -HAVE_DBUS=auto # dbus support +HAVE_DBUS=no # dbus support HAVE_SYSTEMD=auto # Systemd support HAVE_UDEV=auto # Udev/Evdev gamepad support HAVE_THREADS=auto # Threading support