[vlc-commits] macosx: SPMediaKeyTap: Clean up comments

Marvin Scholz git at videolan.org
Fri Aug 3 01:45:55 CEST 2018


vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Aug  1 21:25:09 2018 +0200| [e604293e598f3a35eb7bfa07a978f6e36032f8cc] | committer: Felix Paul Kühne

macosx: SPMediaKeyTap: Clean up comments

(cherry picked from commit c7943c82b2c3a61cf616a4f3fe38d83f47d33bfd)
Signed-off-by: Felix Paul Kühne <felix at feepk.net>

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

 modules/gui/macosx/SPMediaKeyTap.m | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/SPMediaKeyTap.m b/modules/gui/macosx/SPMediaKeyTap.m
index 06b5acc8c8..7b1d061819 100644
--- a/modules/gui/macosx/SPMediaKeyTap.m
+++ b/modules/gui/macosx/SPMediaKeyTap.m
@@ -55,6 +55,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
 
 #pragma mark -
 #pragma mark Setup and teardown
+
 - (id)initWithDelegate:(id)delegate
 {
     self = [super init];
@@ -125,22 +126,23 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
 
 - (void)stopWatchingMediaKeys
 {
-    // TODO<nevyn>: Shut down thread, remove event tap port and source
-
+    // Shut down tap thread
     if(_tapThreadRL){
         CFRunLoopStop(_tapThreadRL);
-        _tapThreadRL=nil;
+        _tapThreadRL = nil;
     }
 
+    // Remove tap port
     if(_eventPort){
         CFMachPortInvalidate(_eventPort);
         CFRelease(_eventPort);
-        _eventPort=nil;
+        _eventPort = nil;
     }
 
+    // Remove tap source
     if(_eventPortSource){
         CFRelease(_eventPortSource);
-        _eventPortSource=nil;
+        _eventPortSource = nil;
     }
 }
 



More information about the vlc-commits mailing list