diff options
author | der richter <der.richter@gmx.de> | 2019-12-24 18:28:46 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2019-12-24 21:51:24 +0100 |
commit | d9e13f42b8d2490bf89b0af4dd1d6a92d280a9af (patch) | |
tree | 1d1ac7c2f3bfec71a54b8b1c65d895ddbb1b200b /video/out/cocoa_cb_common.swift | |
parent | 8e9644761a66ce277f1bf33bb5f6ab90375027de (diff) | |
download | mpv-d9e13f42b8d2490bf89b0af4dd1d6a92d280a9af.tar.bz2 mpv-d9e13f42b8d2490bf89b0af4dd1d6a92d280a9af.tar.xz |
cocoa-cb: implement hidpi scale reporting
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r-- | video/out/cocoa_cb_common.swift | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index 6e016812ab..b677fd6740 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -485,6 +485,12 @@ class CocoaCB: NSObject { return VO_TRUE } return VO_FALSE + case VOCTRL_GET_HIDPI_SCALE: + if let scaleFactor = data?.assumingMemoryBound(to: CDouble.self) { + scaleFactor.pointee = Double(ccb.window?.backingScaleFactor ?? 1.0) + return VO_TRUE; + } + return VO_FALSE case VOCTRL_RESTORE_SCREENSAVER: ccb.enableDisplaySleep() return VO_TRUE |