Skip to content

Commit

Permalink
Use macOS instead of OSX in #available checks
Browse files Browse the repository at this point in the history
  • Loading branch information
saagarjha committed May 29, 2019
1 parent 07b2fcd commit 9cc47c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions iina/AppDelegate.swift
Expand Up @@ -207,7 +207,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
} }


// enter PIP // enter PIP
if #available(OSX 10.12, *), let pc = lastPlayerCore, commandLineStatus.enterPIP { if #available(macOS 10.12, *), let pc = lastPlayerCore, commandLineStatus.enterPIP {
pc.mainWindow.enterPIP() pc.mainWindow.enterPIP()
} }
} }
Expand Down Expand Up @@ -391,7 +391,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
player.mpv.setFlag(MPVOption.Window.fullscreen, true) player.mpv.setFlag(MPVOption.Window.fullscreen, true)
} else if let pipValue = queryDict["pip"], pipValue == "1" { } else if let pipValue = queryDict["pip"], pipValue == "1" {
// pip // pip
if #available(OSX 10.12, *) { if #available(macOS 10.12, *) {
player.mainWindow.enterPIP() player.mainWindow.enterPIP()
} }
} }
Expand Down
4 changes: 2 additions & 2 deletions iina/MainWindowController.swift
Expand Up @@ -1619,7 +1619,7 @@ class MainWindowController: NSWindowController, NSWindowDelegate {


func windowDidMiniaturize(_ notification: Notification) { func windowDidMiniaturize(_ notification: Notification) {
if Preference.bool(for: .togglePipByMinimizingWindow) && !isWindowMiniaturizedDueToPip { if Preference.bool(for: .togglePipByMinimizingWindow) && !isWindowMiniaturizedDueToPip {
if #available(OSX 10.12, *) { if #available(macOS 10.12, *) {
enterPIP() enterPIP()
} }
} }
Expand All @@ -1631,7 +1631,7 @@ class MainWindowController: NSWindowController, NSWindowDelegate {
isPausedDueToMiniaturization = false isPausedDueToMiniaturization = false
} }
if Preference.bool(for: .togglePipByMinimizingWindow) && !isWindowMiniaturizedDueToPip { if Preference.bool(for: .togglePipByMinimizingWindow) && !isWindowMiniaturizedDueToPip {
if #available(OSX 10.12, *) { if #available(macOS 10.12, *) {
exitPIP() exitPIP()
} }
} }
Expand Down

0 comments on commit 9cc47c2

Please sign in to comment.