diff --git a/Makefile.common b/Makefile.common index d8fa9de101..2e9c521e6c 100644 --- a/Makefile.common +++ b/Makefile.common @@ -502,12 +502,14 @@ ifeq ($(HAVE_OPENGL), 1) endif ifeq ($(HAVE_X11), 1) - OBJ += gfx/drivers_context/glx_ctx.o ifeq ($(HAVE_EGL), 1) OBJ += gfx/drivers_context/xegl_ctx.o DEFINES += $(EGL_CFLAGS) LIBS += $(EGL_LIBS) endif + ifneq ($(HAVE_EGL), 1) + OBJ += gfx/drivers_context/glx_ctx.o + endif endif ifeq ($(HAVE_WAYLAND), 1) diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 421246fb96..a0c86b73d1 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -41,7 +41,7 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { #if defined(_WIN32) && defined(HAVE_OPENGL) &gfx_ctx_wgl, #endif -#if defined(HAVE_X11) && defined(HAVE_OPENGL) +#if defined(HAVE_X11) && defined(HAVE_OPENGL) && !defined(HAVE_OPENGLES) &gfx_ctx_glx, #endif #if defined(HAVE_WAYLAND) && defined(HAVE_OPENGL) && defined(HAVE_EGL)