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

Commit

Permalink
Fixed joystick GUID renaming for other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 11, 2012
1 parent 2f788d0 commit dc32b02
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions src/joystick/android/SDL_sysjoystick.c
Expand Up @@ -131,19 +131,19 @@ SDL_SYS_JoystickQuit(void)
{
}

JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
SDL_zero( guid );
SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
return guid;
}

JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = joystick->name;
SDL_zero( guid );
Expand Down
8 changes: 4 additions & 4 deletions src/joystick/beos/SDL_bejoystick.cc
Expand Up @@ -261,19 +261,19 @@ extern "C"
SDL_joyname[0] = NULL;
}

JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
SDL_zero( guid );
SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
return guid;
}

JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = joystick->name;
SDL_zero( guid );
Expand Down
8 changes: 4 additions & 4 deletions src/joystick/bsd/SDL_sysjoystick.c
Expand Up @@ -584,19 +584,19 @@ SDL_SYS_JoystickQuit(void)
return;
}

JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
SDL_zero( guid );
SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
return guid;
}

JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = joystick->name;
SDL_zero( guid );
Expand Down
8 changes: 4 additions & 4 deletions src/joystick/dummy/SDL_sysjoystick.c
Expand Up @@ -108,9 +108,9 @@ SDL_SYS_JoystickQuit(void)
return;
}

JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
SDL_zero( guid );
Expand All @@ -119,9 +119,9 @@ JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
}


JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = joystick->name;
SDL_zero( guid );
Expand Down
8 changes: 4 additions & 4 deletions src/joystick/iphoneos/SDL_sysjoystick.m
Expand Up @@ -133,19 +133,19 @@ SDL_bool SDL_SYS_JoystickAttached(SDL_Joystick *joystick)
return;
}

JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
SDL_zero( guid );
SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
return guid;
}

JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = joystick->name;
SDL_zero( guid );
Expand Down
8 changes: 4 additions & 4 deletions src/joystick/nds/SDL_sysjoystick.c
Expand Up @@ -186,19 +186,19 @@ SDL_SYS_JoystickQuit(void)
{
}

JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
SDL_zero( guid );
SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
return guid;
}

JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
{
JoystickGUID guid;
SDL_JoystickGUID guid;
// the GUID is just the first 16 chars of the name for now
const char *name = joystick->name;
SDL_zero( guid );
Expand Down

0 comments on commit dc32b02

Please sign in to comment.