setting default orientation for iPhone and iPad.
restricted iPhone to landscape mode only.
This commit is contained in:
@@ -68,7 +68,6 @@ void DestroyGame(void)
|
||||
return [CAEAGLLayer class];
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[renderer release];
|
||||
|
||||
@@ -64,11 +64,16 @@
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Overriden to allow any orientation.
|
||||
bool isSmallScreen = (UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPhone;
|
||||
|
||||
if ( isSmallScreen && UIInterfaceOrientationIsPortrait(interfaceOrientation))
|
||||
return NO;
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
||||
|
||||
|
||||
UIDeviceOrientation currentDeviceOrientation = [UIDevice currentDevice].orientation;
|
||||
UIInterfaceOrientation currentInterfaceOrientation = self.interfaceOrientation;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ bool checkFramebufferStatus();
|
||||
|
||||
- (void)render
|
||||
{
|
||||
NSLog(@"Renderer - render");
|
||||
// NSLog(@"Renderer - render");
|
||||
|
||||
struct timeval tv;
|
||||
uint dt;
|
||||
|
||||
Reference in New Issue
Block a user