mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
mac: add support for window-id property
returns the NSWindow
This commit is contained in:
parent
e9d0a31dfe
commit
f805b180d0
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user