Check Linux joystick init on Wayland and Mir

This commit is contained in:
Camilla Berglund 2015-12-10 17:02:35 +01:00
parent 7fec7a0569
commit 2b52008405
2 changed files with 8 additions and 4 deletions

View File

@ -185,11 +185,13 @@ int _glfwPlatformInit(void)
if (!_glfwInitEGL()) if (!_glfwInitEGL())
return GLFW_FALSE; return GLFW_FALSE;
// Need the default conf for when we set a NULL cursor if (!_glfwInitJoysticksLinux())
_glfw.mir.default_conf = mir_cursor_configuration_from_name(mir_arrow_cursor_name); return GLFW_FALSE;
_glfwInitTimerPOSIX(); _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)); _glfw.mir.event_queue = calloc(1, sizeof(EventQueue));
_glfwInitEventQueueMir(_glfw.mir.event_queue); _glfwInitEventQueueMir(_glfw.mir.event_queue);

View File

@ -587,8 +587,10 @@ int _glfwPlatformInit(void)
if (!_glfwInitEGL()) if (!_glfwInitEGL())
return GLFW_FALSE; return GLFW_FALSE;
if (!_glfwInitJoysticksLinux())
return GLFW_FALSE;
_glfwInitTimerPOSIX(); _glfwInitTimerPOSIX();
_glfwInitJoysticksLinux();
if (_glfw.wl.pointer && _glfw.wl.shm) if (_glfw.wl.pointer && _glfw.wl.shm)
{ {