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