setting default orientation for iPhone and iPad.

restricted iPhone to landscape mode only.
This commit is contained in:
techdragon.nguyen@gmail.com
2011-05-10 12:37:41 +00:00
parent aed68a2cd9
commit ac6fd6bbf8
4 changed files with 18 additions and 9 deletions

View File

@@ -68,7 +68,6 @@ void DestroyGame(void)
return [CAEAGLLayer class];
}
- (void)dealloc
{
[renderer release];

View File

@@ -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;

View File

@@ -44,7 +44,7 @@ bool checkFramebufferStatus();
- (void)render
{
NSLog(@"Renderer - render");
// NSLog(@"Renderer - render");
struct timeval tv;
uint dt;

View File

@@ -8,12 +8,10 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>wagic-64x64.png</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>wagic-64x64.png</string>
<key>CFBundleIdentifier</key>
<string>somethingsmart.com.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
@@ -22,6 +20,8 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -34,10 +34,15 @@
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>