summaryrefslogtreecommitdiffstats
path: root/osdep/macos
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2023-11-09 18:57:41 +0100
committerDudemanguy <random342@airmail.cc>2023-11-09 18:12:25 +0000
commit23de1deaaaace05bb9504567a852ac66e76a1ad1 (patch)
tree34569c067e22eaf0a6464ca3af0c412f394073ed /osdep/macos
parenta5bf211e128b4fb916edcf5f46bd23d3ff222711 (diff)
downloadmpv-23de1deaaaace05bb9504567a852ac66e76a1ad1.tar.bz2
mpv-23de1deaaaace05bb9504567a852ac66e76a1ad1.tar.xz
mac: remove runtime checks and compatibility for macOS older than 10.15
we stopped supporting macOS older than 10.15 and hence can remove all the unnecessary runtime checks and compatibility layers.
Diffstat (limited to 'osdep/macos')
-rw-r--r--osdep/macos/remote_command_center.swift5
-rw-r--r--osdep/macos/swift_compat.swift17
2 files changed, 1 insertions, 21 deletions
diff --git a/osdep/macos/remote_command_center.swift b/osdep/macos/remote_command_center.swift
index d97cb3328c..6fb2229f3a 100644
--- a/osdep/macos/remote_command_center.swift
+++ b/osdep/macos/remote_command_center.swift
@@ -17,7 +17,6 @@
import MediaPlayer
-@available(macOS 10.12.2, *)
class RemoteCommandCenter: NSObject {
enum KeyType {
case normal
@@ -105,9 +104,7 @@ class RemoteCommandCenter: NSObject {
}
}
- if let app = NSApp as? Application, let icon = app.getMPVIcon(),
- #available(macOS 10.13.2, *)
- {
+ if let app = NSApp as? Application, let icon = app.getMPVIcon() {
let albumArt = MPMediaItemArtwork(boundsSize: icon.size) { _ in
return icon
}
diff --git a/osdep/macos/swift_compat.swift b/osdep/macos/swift_compat.swift
index 1c8f28f810..83059dae5c 100644
--- a/osdep/macos/swift_compat.swift
+++ b/osdep/macos/swift_compat.swift
@@ -15,23 +15,6 @@
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
-extension NSPasteboard.PasteboardType {
- static let fileURLCompat: NSPasteboard.PasteboardType = {
- if #available(OSX 10.13, *) {
- return .fileURL
- } else {
- return NSPasteboard.PasteboardType(kUTTypeURL as String)
- }
- } ()
-
- static let URLCompat: NSPasteboard.PasteboardType = {
- if #available(OSX 10.13, *) {
- return .URL
- } else {
- return NSPasteboard.PasteboardType(kUTTypeFileURL as String)
- }
- } ()
-}
#if !swift(>=5.0)
extension Data {