From 85c2a4a1d2b23959d9f068db19f5a6f889f5b13c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 4 Jun 2013 23:48:36 +0200 Subject: macosx_events: make remote property an instance variable There was no reason for it to be public. --- osdep/macosx_application_objc.h | 3 +-- osdep/macosx_events.m | 12 +++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'osdep') 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 -#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 -- cgit v1.2.3