src/joystick/iphoneos/SDL_sysjoystick.m
branchgsoc2008_iphone
changeset 2363 49b243db2e04
parent 2348 dd32c95434f4
equal deleted inserted replaced
2362:44fc2537ff9e 2363:49b243db2e04
    87 void
    87 void
    88 SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
    88 SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
    89 {
    89 {
    90 	
    90 	
    91 	Sint16 orientation[3];
    91 	Sint16 orientation[3];
    92 	[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
       
    93 	
    92 	
    94 	if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) {
    93 	if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) {
    95 	
    94 	
       
    95 		[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
    96 		[[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO];
    96 		[[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO];
    97 		
    97 		
    98 		SDL_PrivateJoystickAxis(joystick, 0, orientation[0]);
    98 		SDL_PrivateJoystickAxis(joystick, 0, orientation[0]);
    99 		SDL_PrivateJoystickAxis(joystick, 1, orientation[1]);
    99 		SDL_PrivateJoystickAxis(joystick, 1, orientation[1]);
   100 		SDL_PrivateJoystickAxis(joystick, 2, orientation[2]);
   100 		SDL_PrivateJoystickAxis(joystick, 2, orientation[2]);