From c40214eab9e0d4e5355ad43da4f47b0cdf9b0170 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 26 Nov 2012 17:31:49 -0800 Subject: [PATCH] Fixed joystick attached API call on Linux --- src/joystick/linux/SDL_sysjoystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index 78319e7a5..46e2aa5df 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -1248,7 +1248,7 @@ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int index) /* 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()