diff --git a/iOS/AppDelegate.m b/iOS/AppDelegate.m index 1283115..b238cd6 100644 --- a/iOS/AppDelegate.m +++ b/iOS/AppDelegate.m @@ -18,13 +18,16 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil]; } else { self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil]; } + self.window.rootViewController = self.viewController; + [self.window makeKeyAndVisible]; return YES; } diff --git a/iOS/ViewController.m b/iOS/ViewController.m index 9f75284..2c92f8d 100644 --- a/iOS/ViewController.m +++ b/iOS/ViewController.m @@ -73,7 +73,8 @@ extern GLKView* defaultView; } else { return YES; }*/ - return UIInterfaceOrientationIsLandscape(interfaceOrientation); + //return UIInterfaceOrientationIsLandscape(interfaceOrientation); + return UIInterfaceOrientationIsPortrait(interfaceOrientation); } - (void)setupGL diff --git a/iOS/en.lproj/ViewController_iPhone.xib b/iOS/en.lproj/ViewController_iPhone.xib index 96a4a92..6ea426a 100644 --- a/iOS/en.lproj/ViewController_iPhone.xib +++ b/iOS/en.lproj/ViewController_iPhone.xib @@ -1,111 +1,132 @@ - - - - 1296 - 11E53 - 2182 - 1138.47 - 569.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1181 - - - IBProxyObject - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 460} - - - 3 - MQA - - 2 - - - NO - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - - - ViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - CustomGLKView - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 4 - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - YES - 3 - 1181 - - + + + + 1536 + 11E53 + 2844 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1930 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {320, 480} + + + + + 3 + MQA + + 2 + + + NO + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + ViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + CustomGLKView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 4 + + + + + CustomGLKView + GLKView + + IBProjectSource + ./Classes/CustomGLKView.h + + + + ViewController + GLKViewController + + IBProjectSource + ./Classes/ViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + YES + 3 + 1930 + + diff --git a/iOS/ios_api.cpp b/iOS/ios_api.cpp index 7f46ee7..c949531 100644 --- a/iOS/ios_api.cpp +++ b/iOS/ios_api.cpp @@ -7,7 +7,8 @@ TMyApplication App; extern "C" void AppInit() { - App.OuterInit(480, 320, 480, 320); + App.OuterInit(320, 480, 320, 480); + //App.OuterInit(480, 320, 480, 320); } diff --git a/iOS/template-Info.plist b/iOS/template-Info.plist index d06ba45..6a2c955 100644 --- a/iOS/template-Info.plist +++ b/iOS/template-Info.plist @@ -1,50 +1,50 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Salmon Universal Template - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - Icon.png - CFBundleIdentifier - fishrungames.template - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UILaunchImageFile - Splash-landscape.png - UIPrerenderedIcon - - UIRequiredDeviceCapabilities - - armv7 - - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Salmon Universal Template + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Icon.png + CFBundleIdentifier + fishrungames.template + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchImageFile + Splash-landscape.png + UIPrerenderedIcon + + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + + diff --git a/jni/main_code.cpp b/jni/main_code.cpp index 66e4f8d..3adb619 100644 --- a/jni/main_code.cpp +++ b/jni/main_code.cpp @@ -282,7 +282,7 @@ void TMyApplication::InnerOnMove(vec2 shift) vec3 rotation = Normalize(vec3(RotateShift, 0)); //Inverse - rotation.v[1] =-rotation.v[1]; //Inverse + //rotation.v[1] =-rotation.v[1]; //Inverse vec3 z = vec3(0,0,-1);