Corrected device instance value for Linux joysticks.
authorRyan C. Gordon
Thu, 13 Dec 2012 22:18:32 -0500
changeset 6751a1f87fd7ed72
parent 6750 f8633a3d1cda
child 6752 8de11011eb1f
Corrected device instance value for Linux joysticks.
src/joystick/linux/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick_c.h
     1.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 13 16:57:12 2012 -0800
     1.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 13 22:18:32 2012 -0500
     1.3 @@ -722,7 +722,7 @@
     1.4          return -1;
     1.5      }
     1.6  
     1.7 -    joystick->instance_id = device_index;
     1.8 +    joystick->instance_id = item->device_instance;
     1.9      joystick->hwdata = (struct joystick_hwdata *)
    1.10          SDL_malloc(sizeof(*joystick->hwdata));
    1.11      if (joystick->hwdata == NULL) {
    1.12 @@ -732,7 +732,6 @@
    1.13      }
    1.14      SDL_memset(joystick->hwdata, 0, sizeof(*joystick->hwdata));
    1.15      joystick->hwdata->removed = SDL_FALSE;
    1.16 -    joystick->hwdata->device_instance = item->device_instance;
    1.17      joystick->hwdata->guid = item->guid;
    1.18      joystick->hwdata->fd = fd;
    1.19      joystick->hwdata->fname = SDL_strdup(item->path);
     2.1 --- a/src/joystick/linux/SDL_sysjoystick_c.h	Thu Dec 13 16:57:12 2012 -0800
     2.2 +++ b/src/joystick/linux/SDL_sysjoystick_c.h	Thu Dec 13 22:18:32 2012 -0500
     2.3 @@ -25,7 +25,6 @@
     2.4  struct joystick_hwdata
     2.5  {
     2.6      int fd;
     2.7 -    int device_instance;
     2.8      SDL_bool removed;
     2.9  
    2.10      SDL_JoystickGUID guid;