From bdc7632dfe2811d43f81076819e792b37c126409 Mon Sep 17 00:00:00 2001 From: Holmes Futrell Date: Fri, 18 Jul 2008 17:47:36 +0000 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/iphoneos/SDL_sysjoystick.m b/src/joystick/iphoneos/SDL_sysjoystick.m index d0463af1f..43cf729eb 100644 --- a/src/joystick/iphoneos/SDL_sysjoystick.m +++ b/src/joystick/iphoneos/SDL_sysjoystick.m @@ -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]);