diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-15 09:35:42 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-15 22:54:20 +0200 |
commit | afce2becdd284c5353eb67155278e609c195e99a (patch) | |
tree | 9ca6e4bcb7255480d68de53ebb59b33fa321d739 /ios | |
parent | 4158ae52fb4a0d1141637593c47aed3bb5378e7e (diff) |
For kicks, run the lo_initialize() in a separate thread
Change-Id: Ie31bda8f1e035127d60b281cca9538d3e8803f9f
Diffstat (limited to 'ios')
-rw-r--r-- | ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h | 2 | ||||
-rw-r--r-- | ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm | 21 |
2 files changed, 19 insertions, 4 deletions
diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h index 3b33bc9d75f6..7f4b724b94f8 100644 --- a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h +++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h @@ -12,4 +12,6 @@ @property (strong, nonatomic) UIWindow *window; +- (void) threadMainMethod: (id) argument; + @end diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm index bf0c67a429df..bb95e5e5afe4 100644 --- a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm +++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm @@ -23,17 +23,30 @@ (void) launchOptions; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - // Override point for customization after application launch. + self.window.backgroundColor = [UIColor whiteColor]; - lo_initialize(); + [self.window makeKeyAndVisible]; - // Do something here + NSThread* thread = [[NSThread alloc] initWithTarget:self + selector:@selector(threadMainMethod:) + object:nil]; + [thread start]; - [self.window makeKeyAndVisible]; return YES; } +- (void)threadMainMethod:(id)argument +{ + (void) argument; + + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + lo_initialize(); + + [pool release]; +} + - (void)applicationWillResignActive:(UIApplication *)application { (void) application; |