summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-04-02 23:28:18 +0200
committerder richter <der.richter@gmx.de>2024-04-04 19:39:27 +0200
commitc555cfccfeb6ad658c328873b250a0f0409eb906 (patch)
tree24efc92a111ba17b290b5e288a471ca510ebc7a3 /video/out
parent5178c5b7d114ca432373904c57a2019c51809ed3 (diff)
downloadmpv-c555cfccfeb6ad658c328873b250a0f0409eb906.tar.bz2
mpv-c555cfccfeb6ad658c328873b250a0f0409eb906.tar.xz
mac/common: reuse hidpi window scale frame calculation helper
Diffstat (limited to 'video/out')
-rw-r--r--video/out/mac/common.swift6
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift
index d507a388aa..594a4b8e8a 100644
--- a/video/out/mac/common.swift
+++ b/video/out/mac/common.swift
@@ -601,10 +601,8 @@ class Common: NSObject {
case VOCTRL_GET_UNFS_WINDOW_SIZE:
let sizeData = data!.assumingMemoryBound(to: Int32.self)
let size = UnsafeMutableBufferPointer(start: sizeData, count: 2)
- var rect = window?.unfsContentFrame ?? NSRect(x: 0, y: 0, width: 1280, height: 720)
- if let screen = window?.currentScreen, !Bool(option.vo.hidpi_window_scale) {
- rect = screen.convertRectToBacking(rect)
- }
+ let rect = (Bool(option.vo.hidpi_window_scale) ? window?.unfsContentFrame
+ : window?.unfsContentFramePixel) ?? NSRect(x: 0, y: 0, width: 1280, height: 720)
size[0] = Int32(rect.size.width)
size[1] = Int32(rect.size.height)