added support for special media buttons on Amazon Fire TV remote control
[rocksndiamonds.git] / src / libgame / joystick.c
index a6a065cddc318a4322279fb8dd20b85d3328b973..61d0a113970302c70e1337d20096cab32b5102b9 100644 (file)
@@ -161,22 +161,22 @@ void CheckJoystickData()
 
 int JoystickExt(int player_nr, boolean use_as_joystick_nr)
 {
-  int joystick_fd = joystick.fd[player_nr];
+  int joystick_nr = joystick.nr[player_nr];
   int js_x, js_y;
   boolean js_b1, js_b2;
   int left, right, up, down;
   int result = JOY_NO_ACTION;
 
   if (use_as_joystick_nr)
-    joystick_fd = player_nr;
+    joystick_nr = player_nr;
 
   if (joystick.status != JOYSTICK_ACTIVATED)
     return JOY_NO_ACTION;
 
-  if (joystick_fd < 0)
+  if (joystick_nr < 0)
     return JOY_NO_ACTION;
 
-  if (!ReadJoystick(joystick_fd, &js_x, &js_y, &js_b1, &js_b2))
+  if (!ReadJoystick(joystick_nr, &js_x, &js_y, &js_b1, &js_b2))
   {
     Error(ERR_WARN, "cannot read joystick device '%s'",
          setup.input[player_nr].joy.device_name);