Index: experimental/iOSSampleApp/Shared/skia_ios.mm |
diff --git a/experimental/iOSSampleApp/Shared/skia_ios.mm b/experimental/iOSSampleApp/Shared/skia_ios.mm |
index 4fce1392d81fc692044b9dfadb4cb61ad6de83dd..45675fa61a0b4ef817997c899b682c32f2443784 100644 |
--- a/experimental/iOSSampleApp/Shared/skia_ios.mm |
+++ b/experimental/iOSSampleApp/Shared/skia_ios.mm |
@@ -1,8 +1,6 @@ |
#import <UIKit/UIKit.h> |
#include "SkApplication.h" |
-extern bool set_cmd_line_args(int argc, char *argv[], const char* dir); |
- |
int main(int argc, char *argv[]) { |
signal(SIGPIPE, SIG_IGN); |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; |
@@ -11,9 +9,9 @@ int main(int argc, char *argv[]) { |
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); |
NSString *docsDir = [dirPaths objectAtIndex:0]; |
const char *d = [docsDir UTF8String]; |
- |
- bool ranCommand = set_cmd_line_args(argc, argv, d); |
- int retVal = ranCommand ? 0 : UIApplicationMain(argc, argv, nil, nil); |
+ IOS_launch_type launchType = set_cmd_line_args(argc, argv, d); |
+ int retVal = launchType == kApplication__iOSLaunchType |
+ ? UIApplicationMain(argc, argv, nil, nil) : (int) launchType; |
application_term(); |
[pool release]; |
return retVal; |