mirror of
https://github.com/mpv-player/mpv
synced 2025-01-28 18:53:02 +00:00
macosx_events: make remote property an instance variable
There was no reason for it to be public.
This commit is contained in:
parent
953d225368
commit
85c2a4a1d2
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user