summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-03-24 01:48:22 +0100
committerder richter <der.richter@gmx.de>2024-03-24 23:03:48 +0100
commit37b2e59787522424884813b865158f4d0ab5cb4f (patch)
tree815a0d8c80c659dbc6a7c3c76ffb14828d12c51c
parent6846338cf251cca3d1abf1e7a18e64891ac73e10 (diff)
downloadmpv-37b2e59787522424884813b865158f4d0ab5cb4f.tar.bz2
mpv-37b2e59787522424884813b865158f4d0ab5cb4f.tar.xz
mac/remote: use AppHub directly instead of the singleton
-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) {