src/joystick/iphoneos/SDL_sysjoystick.m
changeset 7191 75360622e65f
parent 7037 3fedf1f25b94
child 7861 29d012c8f2a9
     1.1 --- a/src/joystick/iphoneos/SDL_sysjoystick.m	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/joystick/iphoneos/SDL_sysjoystick.m	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -97,20 +97,20 @@
     1.4  void
     1.5  SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
     1.6  {
     1.7 -	
     1.8 -	Sint16 orientation[3];
     1.9 -	
    1.10 -	if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) {
    1.11 -	
    1.12 -		[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
    1.13 -		[[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO];
    1.14 -		
    1.15 -		SDL_PrivateJoystickAxis(joystick, 0, orientation[0]);
    1.16 -		SDL_PrivateJoystickAxis(joystick, 1, orientation[1]);
    1.17 -		SDL_PrivateJoystickAxis(joystick, 2, orientation[2]);
    1.18  
    1.19 -	}
    1.20 -	
    1.21 +    Sint16 orientation[3];
    1.22 +
    1.23 +    if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) {
    1.24 +
    1.25 +        [[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
    1.26 +        [[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO];
    1.27 +
    1.28 +        SDL_PrivateJoystickAxis(joystick, 0, orientation[0]);
    1.29 +        SDL_PrivateJoystickAxis(joystick, 1, orientation[1]);
    1.30 +        SDL_PrivateJoystickAxis(joystick, 2, orientation[2]);
    1.31 +
    1.32 +    }
    1.33 +
    1.34      return;
    1.35  }
    1.36  
    1.37 @@ -118,10 +118,10 @@
    1.38  void
    1.39  SDL_SYS_JoystickClose(SDL_Joystick * joystick)
    1.40  {
    1.41 -	if ([[SDLUIAccelerationDelegate sharedDelegate] isRunning]) {
    1.42 -		[[SDLUIAccelerationDelegate sharedDelegate] shutdown];
    1.43 -	}
    1.44 -	SDL_SetError("No joystick open with that index");
    1.45 +    if ([[SDLUIAccelerationDelegate sharedDelegate] isRunning]) {
    1.46 +        [[SDLUIAccelerationDelegate sharedDelegate] shutdown];
    1.47 +    }
    1.48 +    SDL_SetError("No joystick open with that index");
    1.49  }
    1.50  
    1.51  /* Function to perform any system-specific joystick related cleanup */
    1.52 @@ -133,7 +133,7 @@
    1.53  SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index )
    1.54  {
    1.55      SDL_JoystickGUID guid;
    1.56 -    // the GUID is just the first 16 chars of the name for now
    1.57 +    /* the GUID is just the first 16 chars of the name for now */
    1.58      const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index );
    1.59      SDL_zero( guid );
    1.60      SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );
    1.61 @@ -143,7 +143,7 @@
    1.62  SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick)
    1.63  {
    1.64      SDL_JoystickGUID guid;
    1.65 -    // the GUID is just the first 16 chars of the name for now
    1.66 +    /* the GUID is just the first 16 chars of the name for now */
    1.67      const char *name = joystick->name;
    1.68      SDL_zero( guid );
    1.69      SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) );