Fixed joystick attached API call on Linux
authorSam Lantinga <slouken@libsdl.org>
Mon, 26 Nov 2012 17:31:49 -0800
changeset 6691 3b8cda6d238b
parent 6690 9548c8a58103
child 6692 f83fa0f4bb2d
Fixed joystick attached API call on Linux
src/joystick/linux/SDL_sysjoystick.c
--- a/src/joystick/linux/SDL_sysjoystick.c	Mon Nov 26 16:37:54 2012 -0800
+++ b/src/joystick/linux/SDL_sysjoystick.c	Mon Nov 26 17:31:49 2012 -0800
@@ -1248,7 +1248,7 @@
 /* Function to determine is this joystick is attached to the system right now */
 int SDL_SYS_JoystickAttached(SDL_Joystick *joystick)
 {
-    return joystick->closed;
+    return !joystick->closed;
 }
 
 int SDL_SYS_NumJoysticks()