[vlc-commits] macosx: work-around so we don' t block the main thread for ages during launch time without showing a window

Felix Paul Kühne git at videolan.org
Tue Feb 21 20:28:09 CET 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Feb 21 20:25:42 2012 +0100| [f80f76424ee76796e9816726ddc276930406cdbd] | committer: Felix Paul Kühne

macosx: work-around so we don't block the main thread for ages during launch time without showing a window
(cherry picked from commit b27649e51ed6f9c3f398f86276bdaf5e0960c860)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=f80f76424ee76796e9816726ddc276930406cdbd
---

 modules/gui/macosx/open.m |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 069000e..dc2c91d 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -277,8 +277,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
     NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace];
 	[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil];
 	[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil];
-    [self scanOpticalMedia:nil];
-    [self qtkChanged:nil];
+    [self performSelector:@selector(scanOpticalMedia:) withObject:nil afterDelay:2.0];
+    [self performSelector:@selector(qtkChanged:) withObject:nil afterDelay:2.5];
 
     [self setMRL: @""];
 }



More information about the vlc-commits mailing list