1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 22:49:58 +00:00

mac/menu: replace app.command usage with event.command

This commit is contained in:
der richter 2024-03-03 16:53:05 +01:00
parent 37990597c7
commit 95d08df7a7

View File

@ -338,7 +338,7 @@ class MenuBar: NSObject {
if panel.runModal() == .OK {
"loadlist \"\(panel.urls[0].path)\"".withCString {
(NSApp as? Application)?.queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
EventsResponder.sharedInstance().queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
}
}
}
@ -366,7 +366,7 @@ class MenuBar: NSObject {
@objc func command(_ menuItem: NSMenuItem) {
guard let menuConfig = getConfigFromMenu(menuItem: menuItem) else { return }
menuConfig.command.withCString {
(NSApp as? Application)?.queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
EventsResponder.sharedInstance().queueCommand(UnsafeMutablePointer<CChar>(mutating: $0))
}
}