diff --git a/Makefile.common b/Makefile.common index 777b2141cc..62a4f904c7 100644 --- a/Makefile.common +++ b/Makefile.common @@ -677,10 +677,8 @@ ifeq ($(HAVE_X11), 1) input/drivers/x11_input.o \ gfx/common/dbus_common.o \ gfx/common/x11_common.o \ - input/drivers_keyboard/keyboard_event_x11.o - ifeq ($(HAVE_XINERAMA), 1) - OBJ += gfx/common/xinerama_common.o - endif + input/drivers_keyboard/keyboard_event_x11.o \ + gfx/common/xinerama_common.o LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS) diff --git a/gfx/common/xinerama_common.c b/gfx/common/xinerama_common.c index bcc489556b..0ce48c66ed 100644 --- a/gfx/common/xinerama_common.c +++ b/gfx/common/xinerama_common.c @@ -25,7 +25,6 @@ #ifdef HAVE_XINERAMA #include -#endif #include "xinerama_common.h" @@ -33,7 +32,6 @@ static XineramaScreenInfo *xinerama_query_screens(Display *dpy, int *num_screens) { -#ifdef HAVE_XINERAMA int major, minor; if (!XineramaQueryExtension(dpy, &major, &minor)) @@ -44,7 +42,6 @@ static XineramaScreenInfo *xinerama_query_screens(Display *dpy, int *num_screens if (XineramaIsActive(dpy)) return XineramaQueryScreens(dpy, num_screens); -#endif return NULL; } @@ -52,7 +49,6 @@ static XineramaScreenInfo *xinerama_query_screens(Display *dpy, int *num_screens bool xinerama_get_coord(Display *dpy, int screen, int *x, int *y, unsigned *w, unsigned *h) { -#ifdef HAVE_XINERAMA int i, num_screens = 0; XineramaScreenInfo *info = xinerama_query_screens(dpy, &num_screens); @@ -72,7 +68,6 @@ bool xinerama_get_coord(Display *dpy, int screen, } XFree(info); -#endif return false; } @@ -80,7 +75,6 @@ bool xinerama_get_coord(Display *dpy, int screen, unsigned xinerama_get_monitor(Display *dpy, int x, int y, int w, int h) { -#ifdef HAVE_XINERAMA int i, num_screens = 0; unsigned monitor = 0; int largest_area = 0; @@ -116,14 +110,12 @@ unsigned xinerama_get_monitor(Display *dpy, int x, int y, if (monitor > 0) return monitor; -#endif return 0; } void xinerama_save_last_used_monitor(Window win) { -#ifdef HAVE_XINERAMA XWindowAttributes target; Window child; int x = 0, y = 0; @@ -137,5 +129,6 @@ void xinerama_save_last_used_monitor(Window win) target.width, target.height); RARCH_LOG("[XINERAMA]: Saved monitor #%u.\n", g_x11_screen); -#endif } + +#endif diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 023a958293..e94502ca56 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -39,7 +39,10 @@ #include "../../frontend/frontend_driver.h" #include "../common/gl_common.h" #include "../common/x11_common.h" + +#ifdef HAVE_XINERAMA #include "../common/xinerama_common.h" +#endif #ifdef HAVE_VULKAN #include "../common/vulkan_common.h" diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index f1521f8ffe..07a0c018b9 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -28,7 +28,10 @@ #include "../common/egl_common.h" #include "../common/gl_common.h" #include "../common/x11_common.h" + +#ifdef HAVE_XINERAMA #include "../common/xinerama_common.h" +#endif #ifndef EGL_OPENGL_ES3_BIT_KHR #define EGL_OPENGL_ES3_BIT_KHR 0x0040