cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m
changeset 3305 91074496d5c9
parent 3270 9bd8fb1707b9
child 3316 52f0482b043f
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Sun Apr 04 16:38:00 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Sun Apr 04 19:51:53 2010 +0000
@@ -79,7 +79,11 @@
 	[setup release];
     
     // overlay with controls, become visible after 2 seconds
-    overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController-iPad" bundle:nil];
+    else
+        overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController-iPhone" bundle:nil];
+
     [uiwindow addSubview:overlayController.view];
     [overlayController release];
 
@@ -110,7 +114,10 @@
 	self.uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
 	self.uiwindow.backgroundColor = [UIColor blackColor];
 	
-	self.viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController" bundle:nil];
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        self.viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil];
+    else
+        self.viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil];
 	[uiwindow addSubview:viewController.view];
     [viewController release];