Unified · Split
| @@ -20,7 +20,6 @@ import Cocoa · 19 unmodified lines | ||
| 20 | 20 | typealias swift_wakeup_cb_fn = (@convention(c) (UnsafeMutableRawPointer?) -> Void)? |
| 21 | 21 | |
| 22 | 22 | class OptionHelper: NSObject { |
| 23 | − var log: LogHelper | |
| 24 | 23 | var vo: UnsafeMutablePointer<vo> |
| 25 | 24 | var optsCachePtr: UnsafeMutablePointer<m_config_cache> |
| 26 | 25 | var optsPtr: UnsafeMutablePointer<mp_vo_opts> |
| @@ -30,15 +29,11 @@ class OptionHelper: NSObject { · 3 unmodified lines | ||
| 30 | 29 | // these computed properties return a local copy of the struct accessed: |
| 31 | 30 | // - don't use if you rely on the pointers |
| 32 | 31 | // - only for reading |
| 33 | − var vout: vo { get { return vo.pointee } } | |
| 34 | − var optsCache: m_config_cache { get { return optsCachePtr.pointee } } | |
| 35 | 32 | var opts: mp_vo_opts { get { return optsPtr.pointee } } |
| 36 | − var macOptsCache: m_config_cache { get { return macOptsCachePtr.pointee } } | |
| 37 | 33 | var macOpts: macos_opts { get { return macOptsPtr.pointee } } |
| 38 | 34 | |
| 39 | − init(_ vo: UnsafeMutablePointer<vo>, _ log: LogHelper) { | |
| 35 | + init(_ vo: UnsafeMutablePointer<vo>) { | |
| 40 | 36 | self.vo = vo |
| 41 | − self.log = log | |
| 42 | 37 | |
| 43 | 38 | guard let cache = m_config_cache_alloc(vo, vo.pointee.global, Application.getVoSubConf()), |
| 44 | 39 | let macCache = m_config_cache_alloc(vo, vo.pointee.global, Application.getMacOSConf()) else |
| @@ -39,7 +39,7 @@ class CocoaCB: Common { · 38 unmodified lines | ||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | func preinit(_ vo: UnsafeMutablePointer<vo>) { |
| 42 | − option = OptionHelper(vo, log) | |
| 42 | + option = OptionHelper(vo) | |
| 43 | 43 | input = InputHelper(vo.pointee.input_ctx, option) |
| 44 | 44 | |
| 45 | 45 | if backendState == .uninitialized { |
| @@ -27,7 +27,7 @@ class MacCommon: Common { · 26 unmodified lines | ||
| 27 | 27 | @objc init(_ vo: UnsafeMutablePointer<vo>) { |
| 28 | 28 | let newlog = mp_log_new(vo, vo.pointee.log, "mac") |
| 29 | 29 | super.init(newlog) |
| 30 | − option = OptionHelper(vo, log) | |
| 30 | + option = OptionHelper(vo) | |
| 31 | 31 | input = InputHelper(vo.pointee.input_ctx, option) |
| 32 | 32 | timer = PreciseTimer(common: self) |
| 33 | 33 | |