i'm trying to make my game landscape only in tier 2 using xcode. in the UntitledViewController at function shouldAutoRotateToInterfaceOrientation if i change this to be
if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
return YES;
}
return NO;
this will prevent the game from going into portrait mode. however when you launch the game the background image is no rotated 90 degrees and is squished. if you leave the above function the way it is, it is fine, however it goes in portrait mode and there are letterbox strips on top and bottom. so as to prevent this i thought id just disallow it to go in portrait mode, then saw thsi bug.
code example
SetVirtualResolution(1024, 768)
SetDisplayAspect(4.0 / 3.0)
//load assets
loadAssets()
function loadAssets()
// display a background
CreateSprite(1, LoadImage("gameboard.png"))
SetSpriteSize(1, 1024, 768)
endfunction
//Main Game Loop
do
Sync()
loop
see attached images KeepLandscape is what happens if i try to keep it landscape only, and AllowPortrait is what i want it to look like, but i dont want to allow portrait to get this.
Cheers,
Deion G.