Fixed a bug where SDL_SYS_JoystickUpdate would send update events even when the accelerometer delegate hadn't received new information from the hardware.
--- 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]);