Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiling Linux code
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 11, 2012
1 parent 01f3178 commit 2f788d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/joystick/linux/SDL_sysjoystick.c
Expand Up @@ -174,7 +174,7 @@ typedef struct SDL_joylist_item
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;
Expand All @@ -190,7 +190,7 @@ static int instance_counter = 0;
#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 };
Expand Down Expand Up @@ -240,7 +240,7 @@ MaybeAddDevice(const char *path)
int fd = -1;
int isstick = 0;
char namebuf[128];
JoystickGUID guid;
SDL_JoystickGUID guid;
SDL_joylist_item *item;

if (path == NULL) {
Expand Down Expand Up @@ -955,13 +955,11 @@ SDL_SYS_JoystickQuit(void)

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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/joystick/linux/SDL_sysjoystick_c.h
Expand Up @@ -28,7 +28,7 @@ struct joystick_hwdata
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 */
Expand Down

0 comments on commit 2f788d0

Please sign in to comment.