Orientation issues in ipad1,2

Basic issue:
My game is in default landscape. However in ipad 1 and 2 it plays in portrait, but works correctly in ipad 3. Traced the issue back to here. So it would be nice if we check wether the user has any orientation preferences given in config file.

if landscape and portrait both valeus are same then we check status bar orientation
else we give in to user preferred orientation

PS: Orientiation values are in landscpae for iphone and ipadt in info.plist of my game.