Fixed compiling Linux code
authorSam Lantinga <slouken@libsdl.org>
Tue, 11 Dec 2012 12:08:36 -0800
changeset 6743 1835c3299b2a
parent 6742 6da5ec031d6c
child 6744 4ac2bb6dc80c
Fixed compiling Linux code
src/joystick/linux/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick_c.h
--- a/src/joystick/linux/SDL_sysjoystick.c	Tue Dec 11 12:03:00 2012 -0800
+++ b/src/joystick/linux/SDL_sysjoystick.c	Tue Dec 11 12:08:36 2012 -0800
@@ -174,7 +174,7 @@
     int device_instance;
     char *path;   /* "/dev/input/event2" or whatever */
     char *name;   /* "SideWinder 3D Pro" or whatever */
-    JoystickGUID guid;
+    SDL_JoystickGUID guid;
     dev_t devnum;
     struct joystick_hwdata *hwdata;
     struct SDL_joylist_item *next;
@@ -190,7 +190,7 @@
 #define NBITS(x) ((((x)-1)/(sizeof(long) * 8))+1)
 
 static int
-IsJoystick(int fd, char *namebuf, const size_t namebuflen, JoystickGUID *guid)
+IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *guid)
 {
     unsigned long evbit[NBITS(EV_MAX)] = { 0 };
     unsigned long keybit[NBITS(KEY_MAX)] = { 0 };
@@ -240,7 +240,7 @@
     int fd = -1;
     int isstick = 0;
     char namebuf[128];
-    JoystickGUID guid;
+    SDL_JoystickGUID guid;
     SDL_joylist_item *item;
 
     if (path == NULL) {
@@ -955,13 +955,11 @@
 
 SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
 {
-    JoystickGUID guid;
     return JoystickByDevIndex(device_index)->guid;
 }
 
 SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
 {
-    JoystickGUID guid;
     return joystick->hwdata->guid;
 }
 
--- a/src/joystick/linux/SDL_sysjoystick_c.h	Tue Dec 11 12:03:00 2012 -0800
+++ b/src/joystick/linux/SDL_sysjoystick_c.h	Tue Dec 11 12:08:36 2012 -0800
@@ -28,7 +28,7 @@
     int device_instance;
     SDL_bool removed;
 
-    JoystickGUID guid;
+    SDL_JoystickGUID guid;
     char *fname;                /* Used in haptic subsystem */
 
     /* The current linux joystick driver maps hats to two axes */