]> git.sesse.net Git - vlc/commitdiff
macosx: remove dead code, small reformatting
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Thu, 1 Jan 2015 16:53:00 +0000 (17:53 +0100)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Fri, 2 Jan 2015 18:36:35 +0000 (19:36 +0100)
modules/gui/macosx/CoreInteraction.m

index 4f50497864c29b1e5dc6878600aa1f85e684b376..5d13a5f4208b495d4e06237085d9fc91c83e58d4 100644 (file)
@@ -70,20 +70,14 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
 
 - (void)playOrPause
 {
-    input_thread_t * p_input;
-    p_input = pl_CurrentInput(VLCIntf);
-    playlist_t * p_playlist = pl_Get(VLCIntf);
+    input_thread_t *p_input = pl_CurrentInput(VLCIntf);
+    playlist_t *p_playlist = pl_Get(VLCIntf);
 
     if (p_input) {
         playlist_TogglePause(p_playlist);
         vlc_object_release(p_input);
-    } else {
-        bool empty;
-
-        PL_LOCK;
-        empty = playlist_IsEmpty(p_playlist);
-        PL_UNLOCK;
 
+    } else {
         PLRootType root = [[[[VLCMain sharedInstance] playlist] model] currentRootType];
         if ([[[VLCMain sharedInstance] playlist] isSelectionEmpty] && (root == ROOT_TYPE_PLAYLIST || root == ROOT_TYPE_MEDIALIBRARY))
             [[[VLCMain sharedInstance] open] openFileGeneric];