summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--osdep/mac/remote_command_center.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/osdep/mac/remote_command_center.swift b/osdep/mac/remote_command_center.swift
index 08bc6e01a2..b000fcdb3e 100644
--- a/osdep/mac/remote_command_center.swift
+++ b/osdep/mac/remote_command_center.swift
@@ -42,6 +42,7 @@ extension RemoteCommandCenter {
class RemoteCommandCenter: EventSubscriber {
unowned let appHub: AppHub
var event: EventHelper? { get { return appHub.event } }
+ var input: InputHelper { get { return appHub.input } }
var configs: [MPRemoteCommand:Config] = [:]
var disabledCommands: [MPRemoteCommand] = []
var isPaused: Bool = false { didSet { updateInfoCenter() } }
@@ -168,7 +169,7 @@ class RemoteCommandCenter: EventSubscriber {
self.configs[event.command]?.state = state
}
- AppHub.shared.input.put(key: config.key | Int32(state))
+ self.input.put(key: config.key | Int32(state))
return .success
}
@@ -179,7 +180,7 @@ class RemoteCommandCenter: EventSubscriber {
}
let cmd = String(format: "seek %.02f absolute", posEvent.positionTime)
- return AppHub.shared.input.command(cmd) ? .success : .commandFailed
+ return self.input.command(cmd) ? .success : .commandFailed
}
func handle(event: EventHelper.Event) {