summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2016-12-15 23:06:04 +0100
committerAkemi <der.richter@gmx.de>2016-12-16 16:32:26 +0100
commit2b8b17402ed59815019b309051b277ba4de82f3b (patch)
tree5181d5fbe3621fcf7da6bbb055d1e72c54dd89b9 /osdep
parentaab98776f602a4bec1a74ee87eb829aadf6437ea (diff)
downloadmpv-2b8b17402ed59815019b309051b277ba4de82f3b.tar.bz2
mpv-2b8b17402ed59815019b309051b277ba4de82f3b.tar.xz
cocoa: cosmetic fixes
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_application.m3
-rw-r--r--osdep/macosx_events.m14
2 files changed, 11 insertions, 6 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index 8808caa0a4..d31269279e 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -206,7 +206,8 @@ static void terminate_cocoa_application(void)
return [item autorelease];
}
-- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)theApp {
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)theApp
+{
return NSTerminateNow;
}
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index c493c58c96..494c9aa88c 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -142,7 +142,8 @@ 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;
}
@@ -178,11 +179,13 @@ static CGEventRef tap_event_callback(CGEventTapProxy proxy, CGEventType type,
}
}
-void cocoa_init_media_keys(void) {
+void cocoa_init_media_keys(void)
+{
[[EventsResponder sharedInstance] startMediaKeys];
}
-void cocoa_uninit_media_keys(void) {
+void cocoa_uninit_media_keys(void)
+{
[[EventsResponder sharedInstance] stopMediaKeys];
}
@@ -446,10 +449,11 @@ void cocoa_set_input_context(struct input_ctx *input_context)
NSString *chars;
- if ([self useAltGr] && RightAltPressed([event modifierFlags]))
+ if ([self useAltGr] && RightAltPressed([event modifierFlags])) {
chars = [event characters];
- else
+ } else {
chars = [event charactersIgnoringModifiers];
+ }
struct bstr t = bstr0([chars UTF8String]);
int key = convert_key([event keyCode], bstr_decode_utf8(t, &t));