src/joystick/iphoneos/SDL_sysjoystick.m
changeset 6744 4ac2bb6dc80c
parent 6707 70eeb7e3ec2f
child 6885 700f1b25f77f
equal deleted inserted replaced
6743:1835c3299b2a 6744:4ac2bb6dc80c
   131 SDL_SYS_JoystickQuit(void)
   131 SDL_SYS_JoystickQuit(void)
   132 {
   132 {
   133     return;
   133     return;
   134 }
   134 }
   135 
   135 
   136 JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
   136 SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
   137 {
   137 {
   138     JoystickGUID guid;
   138     SDL_JoystickGUID guid;
   139     // the GUID is just the first 16 chars of the name for now
   139     // the GUID is just the first 16 chars of the name for now
   140     const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
   140     const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
   141     SDL_zero( guid );
   141     SDL_zero( guid );
   142     SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
   142     SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
   143     return guid;
   143     return guid;
   144 }
   144 }
   145 
   145 
   146 JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
   146 SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
   147 {
   147 {
   148     JoystickGUID guid;
   148     SDL_JoystickGUID guid;
   149     // the GUID is just the first 16 chars of the name for now
   149     // the GUID is just the first 16 chars of the name for now
   150     const char *name = joystick->name;
   150     const char *name = joystick->name;
   151     SDL_zero( guid );
   151     SDL_zero( guid );
   152     SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
   152     SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
   153     return guid;
   153     return guid;