summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-15 09:35:42 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-15 22:54:20 +0200
commitafce2becdd284c5353eb67155278e609c195e99a (patch)
tree9ca6e4bcb7255480d68de53ebb59b33fa321d739 /ios
parentWaE: Werror=shadow (diff)
downloadcore-afce2becdd284c5353eb67155278e609c195e99a.tar.gz
core-afce2becdd284c5353eb67155278e609c195e99a.zip
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.h2
-rw-r--r--ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm21
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;