summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-06-04 23:48:36 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-06-05 00:02:29 +0200
commit85c2a4a1d2b23959d9f068db19f5a6f889f5b13c (patch)
treec8d531b6486c6b0fc35e384593c2c0df6c0ee738 /osdep
parent953d22536876884faf75beba49a090e522a45b10 (diff)
downloadmpv-85c2a4a1d2b23959d9f068db19f5a6f889f5b13c.tar.bz2
mpv-85c2a4a1d2b23959d9f068db19f5a6f889f5b13c.tar.xz
macosx_events: make remote property an instance variable
There was no reason for it to be public.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_application_objc.h3
-rw-r--r--osdep/macosx_events.m12
2 files changed, 8 insertions, 7 deletions
diff --git a/osdep/macosx_application_objc.h b/osdep/macosx_application_objc.h
index c8026cfc14..0a6b70a95d 100644
--- a/osdep/macosx_application_objc.h
+++ b/osdep/macosx_application_objc.h
@@ -17,8 +17,8 @@
*/
#import <Cocoa/Cocoa.h>
-#import "ar/HIDRemote.h"
#include "osdep/macosx_application.h"
+#import "ar/HIDRemote.h"
struct cocoa_input_queue;
@@ -35,7 +35,6 @@ struct cocoa_input_queue;
- (void)startMediaKeys;
- (void)restartMediaKeys;
- (void)stopMediaKeys;
-@property(nonatomic, retain) HIDRemote *remote;
@end
@interface Application : NSApplication
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m
index 7970f0b5d5..661ef638ca 100644
--- a/osdep/macosx_events.m
+++ b/osdep/macosx_events.m
@@ -168,14 +168,15 @@ void cocoa_put_key(int keycode)
@implementation EventsResponder {
CFMachPortRef _mk_tap_port;
+ HIDRemote *_remote;
}
- (void)startAppleRemote
{
dispatch_async(dispatch_get_main_queue(), ^{
- self.remote = [[[HIDRemote alloc] init] autorelease];
- if (self.remote) {
- [self.remote setDelegate:self];
- [self.remote startRemoteControl:kHIDRemoteModeExclusiveAuto];
+ self->_remote = [[HIDRemote alloc] init];
+ if (self->_remote) {
+ [self->_remote setDelegate:self];
+ [self->_remote startRemoteControl:kHIDRemoteModeExclusiveAuto];
}
});
@@ -183,7 +184,8 @@ void cocoa_put_key(int keycode)
- (void)stopAppleRemote
{
dispatch_async(dispatch_get_main_queue(), ^{
- [self.remote stopRemoteControl];
+ [self->_remote stopRemoteControl];
+ [self->_remote release];
});
}
- (void)restartMediaKeys