0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

mac: add support for window-id property

returns the NSWindow
This commit is contained in:
der richter 2023-12-11 00:33:47 +01:00 committed by sfan5
parent e9d0a31dfe
commit f805b180d0

View File

@ -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()