summaryrefslogtreecommitdiffstats
path: root/osdep/macos/swift_extensions.swift
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2019-11-30 23:47:52 +0100
committerder richter <der.richter@gmx.de>2019-12-15 20:07:11 +0100
commitc8cc203735d73f62def2692d1027f45ac10c03db (patch)
tree021ddf9157de39ea066f727f7bc298eb2915531b /osdep/macos/swift_extensions.swift
parente5676a67eef087aba1ccc0ab707cc5f96cc09470 (diff)
downloadmpv-c8cc203735d73f62def2692d1027f45ac10c03db.tar.bz2
mpv-c8cc203735d73f62def2692d1027f45ac10c03db.tar.xz
cocoa-cb: use m_config_cache and new VOCTRL for option handling
this removes the direct access of the mp_vo_opts stuct via the vo struct and replaces it with the m_config_cache usage. this updates the fullscreen and window-minimized property via m_config_cache_write_opt instead of the old mechanism via VOCTRL and event flagging. also use the new VOCTRL_VO_OPTS_CHANGED event for fullscreen and border changes.
Diffstat (limited to 'osdep/macos/swift_extensions.swift')
-rw-r--r--osdep/macos/swift_extensions.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/osdep/macos/swift_extensions.swift b/osdep/macos/swift_extensions.swift
index c48ad6e798..a1aeb0abf7 100644
--- a/osdep/macos/swift_extensions.swift
+++ b/osdep/macos/swift_extensions.swift
@@ -80,3 +80,10 @@ extension Bool {
self.init(int32 != 0)
}
}
+
+extension Int32 {
+
+ init(_ bool: Bool) {
+ self.init(bool ? 1 : 0)
+ }
+}