Fixed compiling Linux code
authorSam Lantinga
Tue, 11 Dec 2012 12:08:36 -0800
changeset 67431835c3299b2a
parent 6742 6da5ec031d6c
child 6744 4ac2bb6dc80c
Fixed compiling Linux code
src/joystick/linux/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick_c.h
     1.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Tue Dec 11 12:03:00 2012 -0800
     1.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Tue Dec 11 12:08:36 2012 -0800
     1.3 @@ -174,7 +174,7 @@
     1.4      int device_instance;
     1.5      char *path;   /* "/dev/input/event2" or whatever */
     1.6      char *name;   /* "SideWinder 3D Pro" or whatever */
     1.7 -    JoystickGUID guid;
     1.8 +    SDL_JoystickGUID guid;
     1.9      dev_t devnum;
    1.10      struct joystick_hwdata *hwdata;
    1.11      struct SDL_joylist_item *next;
    1.12 @@ -190,7 +190,7 @@
    1.13  #define NBITS(x) ((((x)-1)/(sizeof(long) * 8))+1)
    1.14  
    1.15  static int
    1.16 -IsJoystick(int fd, char *namebuf, const size_t namebuflen, JoystickGUID *guid)
    1.17 +IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *guid)
    1.18  {
    1.19      unsigned long evbit[NBITS(EV_MAX)] = { 0 };
    1.20      unsigned long keybit[NBITS(KEY_MAX)] = { 0 };
    1.21 @@ -240,7 +240,7 @@
    1.22      int fd = -1;
    1.23      int isstick = 0;
    1.24      char namebuf[128];
    1.25 -    JoystickGUID guid;
    1.26 +    SDL_JoystickGUID guid;
    1.27      SDL_joylist_item *item;
    1.28  
    1.29      if (path == NULL) {
    1.30 @@ -955,13 +955,11 @@
    1.31  
    1.32  SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
    1.33  {
    1.34 -    JoystickGUID guid;
    1.35      return JoystickByDevIndex(device_index)->guid;
    1.36  }
    1.37  
    1.38  SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
    1.39  {
    1.40 -    JoystickGUID guid;
    1.41      return joystick->hwdata->guid;
    1.42  }
    1.43  
     2.1 --- a/src/joystick/linux/SDL_sysjoystick_c.h	Tue Dec 11 12:03:00 2012 -0800
     2.2 +++ b/src/joystick/linux/SDL_sysjoystick_c.h	Tue Dec 11 12:08:36 2012 -0800
     2.3 @@ -28,7 +28,7 @@
     2.4      int device_instance;
     2.5      SDL_bool removed;
     2.6  
     2.7 -    JoystickGUID guid;
     2.8 +    SDL_JoystickGUID guid;
     2.9      char *fname;                /* Used in haptic subsystem */
    2.10  
    2.11      /* The current linux joystick driver maps hats to two axes */