From 2b52008405868a472002462aad7bc15707735ec8 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 10 Dec 2015 17:02:35 +0100 Subject: [PATCH] Check Linux joystick init on Wayland and Mir --- src/mir_init.c | 8 +++++--- src/wl_init.c | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) 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) {