fixed joystick naming convention from file descriptor to joystick number
[rocksndiamonds.git] / src / libgame / system.c
index b5de8c9e6959ee11848072c3ec9599f0e52a9850..5ccf3fb3784650147bc1f70aed77af72925dd0bb 100644 (file)
@@ -1620,7 +1620,7 @@ void InitJoysticks()
   /* always start with reliable default values */
   joystick.status = JOYSTICK_NOT_AVAILABLE;
   for (i = 0; i < MAX_PLAYERS; i++)
-    joystick.fd[i] = -1;               /* joystick device closed */
+    joystick.nr[i] = -1;               /* no joystick configured */
 
   SDLInitJoysticks();
 }
@@ -1629,3 +1629,8 @@ boolean ReadJoystick(int nr, int *x, int *y, boolean *b1, boolean *b2)
 {
   return SDLReadJoystick(nr, x, y, b1, b2);
 }
+
+boolean CheckJoystickOpened(int nr)
+{
+  return SDLCheckJoystickOpened(nr);
+}