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];
|
return [CAEAGLLayer class];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
[renderer release];
|
[renderer release];
|
||||||
|
|||||||
@@ -64,11 +64,16 @@
|
|||||||
|
|
||||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
// Overriden to allow any orientation.
|
// Overriden to allow any orientation.
|
||||||
|
bool isSmallScreen = (UI_USER_INTERFACE_IDIOM()) == UIUserInterfaceIdiomPhone;
|
||||||
|
|
||||||
|
if ( isSmallScreen && UIInterfaceOrientationIsPortrait(interfaceOrientation))
|
||||||
|
return NO;
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
||||||
|
|
||||||
UIDeviceOrientation currentDeviceOrientation = [UIDevice currentDevice].orientation;
|
UIDeviceOrientation currentDeviceOrientation = [UIDevice currentDevice].orientation;
|
||||||
UIInterfaceOrientation currentInterfaceOrientation = self.interfaceOrientation;
|
UIInterfaceOrientation currentInterfaceOrientation = self.interfaceOrientation;
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ bool checkFramebufferStatus();
|
|||||||
|
|
||||||
- (void)render
|
- (void)render
|
||||||
{
|
{
|
||||||
NSLog(@"Renderer - render");
|
// NSLog(@"Renderer - render");
|
||||||
|
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
uint dt;
|
uint dt;
|
||||||
|
|||||||
@@ -8,12 +8,10 @@
|
|||||||
<string>${PRODUCT_NAME}</string>
|
<string>${PRODUCT_NAME}</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>wagic-64x64.png</string>
|
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string></string>
|
<string>wagic-64x64.png</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>somethingsmart.com.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>somethingsmart.com.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
@@ -22,6 +20,8 @@
|
|||||||
<string>${PRODUCT_NAME}</string>
|
<string>${PRODUCT_NAME}</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string></string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
@@ -34,10 +34,15 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Reference in New Issue
Block a user