Fixed a bug where SDL_SYS_JoystickUpdate would send update events even when the accelerometer delegate hadn't received new information from the hardware. gsoc2008_iphone
authorHolmes Futrell <hfutrell@umail.ucsb.edu>
Fri, 18 Jul 2008 17:47:36 +0000
branchgsoc2008_iphone
changeset 236349b243db2e04
parent 2362 44fc2537ff9e
child 2364 e321b52dee8f
Fixed a bug where SDL_SYS_JoystickUpdate would send update events even when the accelerometer delegate hadn't received new information from the hardware.
src/joystick/iphoneos/SDL_sysjoystick.m
     1.1 --- a/src/joystick/iphoneos/SDL_sysjoystick.m	Fri Jul 18 17:46:17 2008 +0000
     1.2 +++ b/src/joystick/iphoneos/SDL_sysjoystick.m	Fri Jul 18 17:47:36 2008 +0000
     1.3 @@ -89,10 +89,10 @@
     1.4  {
     1.5  	
     1.6  	Sint16 orientation[3];
     1.7 -	[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
     1.8  	
     1.9  	if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) {
    1.10  	
    1.11 +		[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
    1.12  		[[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO];
    1.13  		
    1.14  		SDL_PrivateJoystickAxis(joystick, 0, orientation[0]);