summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
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