summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-12-05 15:09:32 +0100
committerDudemanguy <random342@airmail.cc>2020-12-06 17:36:43 +0000
commit96bcf51c3907ca04a2f553e71d3ac7dea5ebeb06 (patch)
tree8724e123d48e60c658502e15978cc214441881fa /video/out/cocoa_cb_common.swift
parenta700b8130bfc06de3b1fb14e136e396423923ed3 (diff)
downloadmpv-96bcf51c3907ca04a2f553e71d3ac7dea5ebeb06.tar.bz2
mpv-96bcf51c3907ca04a2f553e71d3ac7dea5ebeb06.tar.xz
mac: support screen-name and fs-screen-name opts
the screen-name and fs-screen-name option allow for specifying screens based on their name. this is the name of the NSScreen and also reported by the VOCTRL_GET_DISPLAY_NAMES event. the old screen and fs-screen options by id, respectively, are preferred over these new ones.
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index 476b4820bc..8dd76f4bc5 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -83,8 +83,7 @@ class CocoaCB: Common {
}
func updateWindowSize(_ vo: UnsafeMutablePointer<vo>) {
- guard let opts: mp_vo_opts = mpv?.opts,
- let targetScreen = getScreenBy(id: Int(opts.screen_id)) ?? NSScreen.main else
+ guard let targetScreen = getTargetScreen(forFullscreen: false) ?? NSScreen.main else
{
log.sendWarning("Couldn't update Window size, no Screen available")
return