Fixed joystick attached API call on Linux

This commit is contained in:
Sam Lantinga 2012-11-26 17:31:49 -08:00
parent 34b88dfaae
commit 3765f3223a

View file

@ -1248,7 +1248,7 @@ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int index)
/* Function to determine is this joystick is attached to the system right now */ /* Function to determine is this joystick is attached to the system right now */
int SDL_SYS_JoystickAttached(SDL_Joystick *joystick) int SDL_SYS_JoystickAttached(SDL_Joystick *joystick)
{ {
return joystick->closed; return !joystick->closed;
} }
int SDL_SYS_NumJoysticks() int SDL_SYS_NumJoysticks()