[vlc-commits] macosx: SPMediaKeyTap: Clean up comments
Marvin Scholz
git at videolan.org
Wed Aug 1 22:00:45 CEST 2018
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Aug 1 21:25:09 2018 +0200| [c7943c82b2c3a61cf616a4f3fe38d83f47d33bfd] | committer: Marvin Scholz
macosx: SPMediaKeyTap: Clean up comments
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7943c82b2c3a61cf616a4f3fe38d83f47d33bfd
---
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 275b34c212..766e591e8b 100644
--- a/modules/gui/macosx/SPMediaKeyTap.m
+++ b/modules/gui/macosx/SPMediaKeyTap.m
@@ -56,6 +56,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
#pragma mark -
#pragma mark Setup and teardown
+
- (id)initWithDelegate:(id)delegate
{
self = [super init];
@@ -127,22 +128,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