changeset 2363:49b243db2e04 gsoc2008_iphone

Fixed a bug where SDL_SYS_JoystickUpdate would send update events even when the accelerometer delegate hadn't received new information from the hardware.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Fri, 18 Jul 2008 17:47:36 +0000
parents 44fc2537ff9e
children e321b52dee8f
files src/joystick/iphoneos/SDL_sysjoystick.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/joystick/iphoneos/SDL_sysjoystick.m	Fri Jul 18 17:46:17 2008 +0000
+++ b/src/joystick/iphoneos/SDL_sysjoystick.m	Fri Jul 18 17:47:36 2008 +0000
@@ -89,10 +89,10 @@
 {
 	
 	Sint16 orientation[3];
-	[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
 	
 	if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) {
 	
+		[[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation];
 		[[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO];
 		
 		SDL_PrivateJoystickAxis(joystick, 0, orientation[0]);