diff options
author | der richter <der.richter@gmx.de> | 2023-12-11 00:33:47 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-12-15 09:20:10 +0100 |
commit | f805b180d00b10bdd0b5fa01197f5b53188d44f8 (patch) | |
tree | 7155f70880e5696ac0f7a17917467bda408acf6b /video/out/mac/common.swift | |
parent | e9d0a31dfe59f5b22e243204b169145226f20a52 (diff) | |
download | mpv-f805b180d00b10bdd0b5fa01197f5b53188d44f8.tar.bz2 mpv-f805b180d00b10bdd0b5fa01197f5b53188d44f8.tar.xz |
mac: add support for window-id property
returns the NSWindow
Diffstat (limited to 'video/out/mac/common.swift')
-rw-r--r-- | video/out/mac/common.swift | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift index 226d628051..be3e1b517d 100644 --- a/video/out/mac/common.swift +++ b/video/out/mac/common.swift @@ -562,6 +562,13 @@ class Common: NSObject { let fps = data!.assumingMemoryBound(to: CDouble.self) fps.pointee = currentFps() return VO_TRUE + case VOCTRL_GET_WINDOW_ID: + guard let window = window else { + return VO_NOTAVAIL + } + let wid = data!.assumingMemoryBound(to: Int64.self) + wid.pointee = unsafeBitCast(window, to: Int64.self) + return VO_TRUE case VOCTRL_GET_HIDPI_SCALE: let scaleFactor = data!.assumingMemoryBound(to: CDouble.self) let screen = getCurrentScreen() |