diff --git a/src/mir_init.c b/src/mir_init.c index 9372f9a6..0ca57a66 100644 --- a/src/mir_init.c +++ b/src/mir_init.c @@ -185,11 +185,13 @@ int _glfwPlatformInit(void) if (!_glfwInitEGL()) return GLFW_FALSE; - // Need the default conf for when we set a NULL cursor - _glfw.mir.default_conf = mir_cursor_configuration_from_name(mir_arrow_cursor_name); + if (!_glfwInitJoysticksLinux()) + return GLFW_FALSE; _glfwInitTimerPOSIX(); - _glfwInitJoysticksLinux(); + + // Need the default conf for when we set a NULL cursor + _glfw.mir.default_conf = mir_cursor_configuration_from_name(mir_arrow_cursor_name); _glfw.mir.event_queue = calloc(1, sizeof(EventQueue)); _glfwInitEventQueueMir(_glfw.mir.event_queue); diff --git a/src/wl_init.c b/src/wl_init.c index 6991921a..a27bf6fc 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -587,8 +587,10 @@ int _glfwPlatformInit(void) if (!_glfwInitEGL()) return GLFW_FALSE; + if (!_glfwInitJoysticksLinux()) + return GLFW_FALSE; + _glfwInitTimerPOSIX(); - _glfwInitJoysticksLinux(); if (_glfw.wl.pointer && _glfw.wl.shm) {