When autorotating, I set
GAME_AUTOROTATION = kGameAutorotationUIViewController
and
#elif GAME_AUTOROTATION == kGameAutorotationUIViewController
return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );
This means that if I hold the device in either landscape orientation it will autorotate. The thing is, the rotation is always shifted by 90 degrees (ie when I rotate to landscape right I get portrait).
How do I go along in fixing this?
The correct way to set
GAME_AUTOROTATIONis this:(I have mine in GameConfig.h.)
I can’t make sense of
GAME_AUTOROTATION = kGameAutorotationUIViewController, so just thinking this could be the cause of the problem (if you used it like that).In any case, if you still have problems with autorotation, set a breakpoint in
willRotateToInterfaceOrientationand inspect what happens from there; same withwillAnimateRotationToInterfaceOrientation.