summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2017-03-26 21:46:28 +0200
committerAkemi <der.richter@gmx.de>2017-08-18 19:47:47 +0200
commit344b75f52da349ab293ee2bb7f48604eabcffb0f (patch)
treefe93986060a65603b51949ccd9ce354306253c61 /osdep
parente0a2d152163977fdc2a48ac1bd4144614a1e6f25 (diff)
downloadmpv-344b75f52da349ab293ee2bb7f48604eabcffb0f.tar.bz2
mpv-344b75f52da349ab293ee2bb7f48604eabcffb0f.tar.xz
osx: code cleanups and cosmetic fixes
silence build warnings, clean up code style and remove unused code.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_compat.h2
-rw-r--r--osdep/macosx_events.m10
2 files changed, 7 insertions, 5 deletions
diff --git a/osdep/macosx_compat.h b/osdep/macosx_compat.h
index e448fe6213..2b75c7695e 100644
--- a/osdep/macosx_compat.h
+++ b/osdep/macosx_compat.h
@@ -45,7 +45,7 @@ typedef NSUInteger NSEventModifierFlags;
static const NSEventModifierFlags NSEventModifierFlagShift = NSShiftKeyMask;
static const NSEventModifierFlags NSEventModifierFlagControl = NSControlKeyMask;
-static const NSEventModifierFlags NSEventModifierFlagCommand = NSCommandKeyMask;
+static const NSEventModifierFlags NSEventModifierFlagCommand = NSCommandKeyMask;
static const NSEventModifierFlags NSEventModifierFlagOption = NSAlternateKeyMask;
#endif
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index cffbfa9587..25c9948a98 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -142,7 +142,7 @@ static int mk_flags(NSEvent *event)
return ([event data1] & 0x0000FFFF);
}
-static int mk_down(NSEvent *event)
+static int mk_down(NSEvent *event)
{
return (((mk_flags(event) & 0xFF00) >> 8)) == 0xA;
}
@@ -254,7 +254,7 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
[_input_lock unlock];
}
-- (void)setInputContext:(struct input_ctx *)ctx;
+- (void)setInputContext:(struct input_ctx *)ctx
{
[_input_lock lock];
_inputContext = ctx;
@@ -346,7 +346,6 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
- (void)startAppleRemote
{
-
#if HAVE_APPLE_REMOTE
dispatch_async(dispatch_get_main_queue(), ^{
self->_remote = [[HIDRemote alloc] init];
@@ -356,8 +355,8 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
}
});
#endif
-
}
+
- (void)stopAppleRemote
{
#if HAVE_APPLE_REMOTE
@@ -367,10 +366,12 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
});
#endif
}
+
- (void)restartMediaKeys
{
CGEventTapEnable(self->_mk_tap_port, true);
}
+
- (void)startMediaKeys
{
dispatch_async(dispatch_get_main_queue(), ^{
@@ -390,6 +391,7 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
[[NSRunLoop mainRunLoop] addPort:port forMode:NSRunLoopCommonModes];
});
}
+
- (void)stopMediaKeys
{
dispatch_async(dispatch_get_main_queue(), ^{