From 8aaa6d21620d59ef7006fafc6003a89ee7e8543b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 14 Oct 2015 12:36:57 +0200 Subject: [PATCH] Cleanup --- src/x11_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/x11_init.c b/src/x11_init.c index 99d80f70..e962eb3b 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -787,8 +787,6 @@ void _glfwPlatformTerminate(void) _glfw.x11.im = NULL; } - _glfwTerminateJoysticks(); - if (_glfw.x11.display) { XCloseDisplay(_glfw.x11.display); @@ -796,8 +794,9 @@ void _glfwPlatformTerminate(void) } // NOTE: This needs to be done after XCloseDisplay, as libGL registers - // internal cleanup callbacks in libX11 + // cleanup callbacks that get called by it _glfwTerminateContextAPI(); + _glfwTerminateJoysticks(); } const char* _glfwPlatformGetVersionString(void)