Mir: Fix broken build

Regression caused by e9560ef021.
master
Camilla Löwy ago%!(EXTRA string=8 years)
parent 7a8516d296
commit d88347ee7d
  1. 5
      src/CMakeLists.txt
  2. 1
      src/mir_platform.h
  3. 19
      src/mir_window.c

@ -48,10 +48,11 @@ elseif (_GLFW_WAYLAND)
BASENAME pointer-constraints-unstable-v1) BASENAME pointer-constraints-unstable-v1)
elseif (_GLFW_MIR) elseif (_GLFW_MIR)
set(glfw_HEADERS ${common_HEADERS} mir_platform.h linux_joystick.h set(glfw_HEADERS ${common_HEADERS} mir_platform.h linux_joystick.h
posix_time.h posix_tls.h xkb_unicode.h egl_context.h) posix_time.h posix_tls.h xkb_unicode.h egl_context.h
osmesa_context.h)
set(glfw_SOURCES ${common_SOURCES} mir_init.c mir_monitor.c mir_window.c set(glfw_SOURCES ${common_SOURCES} mir_init.c mir_monitor.c mir_window.c
linux_joystick.c posix_time.c posix_tls.c xkb_unicode.c linux_joystick.c posix_time.c posix_tls.c xkb_unicode.c
egl_context.c) egl_context.c osmesa_context.c)
elseif (_GLFW_OSMESA) elseif (_GLFW_OSMESA)
set(glfw_HEADERS ${common_HEADERS} null_platform.h null_joystick.h set(glfw_HEADERS ${common_HEADERS} null_platform.h null_joystick.h
posix_time.h posix_tls.h osmesa_context.h) posix_time.h posix_tls.h osmesa_context.h)

@ -52,6 +52,7 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(Vk
#include "linux_joystick.h" #include "linux_joystick.h"
#include "xkb_unicode.h" #include "xkb_unicode.h"
#include "egl_context.h" #include "egl_context.h"
#include "osmesa_context.h"
#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
#define _glfw_dlclose(handle) dlclose(handle) #define _glfw_dlclose(handle) dlclose(handle)

@ -405,10 +405,21 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (ctxconfig->client != GLFW_NO_API) if (ctxconfig->client != GLFW_NO_API)
{ {
if (!_glfwInitEGL()) if (ctxconfig->source == GLFW_EGL_CONTEXT_API ||
return GLFW_FALSE; ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig)) {
return GLFW_FALSE; if (!_glfwInitEGL())
return GLFW_FALSE;
if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
return GLFW_FALSE;
}
else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
{
if (!_glfwInitOSMesa())
return GLFW_FALSE;
if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig))
return GLFW_FALSE;
}
} }
return GLFW_TRUE; return GLFW_TRUE;

Loading…
Cancel
Save