mirror of
https://github.com/mpv-player/mpv
synced 2025-02-26 10:14:33 +00:00
mac/option: remove unused and obsolete variables
This commit is contained in:
parent
dc5059d027
commit
2d9be04c00
@ -20,7 +20,6 @@ import Cocoa
|
|||||||
typealias swift_wakeup_cb_fn = (@convention(c) (UnsafeMutableRawPointer?) -> Void)?
|
typealias swift_wakeup_cb_fn = (@convention(c) (UnsafeMutableRawPointer?) -> Void)?
|
||||||
|
|
||||||
class OptionHelper: NSObject {
|
class OptionHelper: NSObject {
|
||||||
var log: LogHelper
|
|
||||||
var vo: UnsafeMutablePointer<vo>
|
var vo: UnsafeMutablePointer<vo>
|
||||||
var optsCachePtr: UnsafeMutablePointer<m_config_cache>
|
var optsCachePtr: UnsafeMutablePointer<m_config_cache>
|
||||||
var optsPtr: UnsafeMutablePointer<mp_vo_opts>
|
var optsPtr: UnsafeMutablePointer<mp_vo_opts>
|
||||||
@ -30,15 +29,11 @@ class OptionHelper: NSObject {
|
|||||||
// these computed properties return a local copy of the struct accessed:
|
// these computed properties return a local copy of the struct accessed:
|
||||||
// - don't use if you rely on the pointers
|
// - don't use if you rely on the pointers
|
||||||
// - only for reading
|
// - only for reading
|
||||||
var vout: vo { get { return vo.pointee } }
|
|
||||||
var optsCache: m_config_cache { get { return optsCachePtr.pointee } }
|
|
||||||
var opts: mp_vo_opts { get { return optsPtr.pointee } }
|
var opts: mp_vo_opts { get { return optsPtr.pointee } }
|
||||||
var macOptsCache: m_config_cache { get { return macOptsCachePtr.pointee } }
|
|
||||||
var macOpts: macos_opts { get { return macOptsPtr.pointee } }
|
var macOpts: macos_opts { get { return macOptsPtr.pointee } }
|
||||||
|
|
||||||
init(_ vo: UnsafeMutablePointer<vo>, _ log: LogHelper) {
|
init(_ vo: UnsafeMutablePointer<vo>) {
|
||||||
self.vo = vo
|
self.vo = vo
|
||||||
self.log = log
|
|
||||||
|
|
||||||
guard let cache = m_config_cache_alloc(vo, vo.pointee.global, Application.getVoSubConf()),
|
guard let cache = m_config_cache_alloc(vo, vo.pointee.global, Application.getVoSubConf()),
|
||||||
let macCache = m_config_cache_alloc(vo, vo.pointee.global, Application.getMacOSConf()) else
|
let macCache = m_config_cache_alloc(vo, vo.pointee.global, Application.getMacOSConf()) else
|
||||||
|
@ -39,7 +39,7 @@ class CocoaCB: Common {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func preinit(_ vo: UnsafeMutablePointer<vo>) {
|
func preinit(_ vo: UnsafeMutablePointer<vo>) {
|
||||||
option = OptionHelper(vo, log)
|
option = OptionHelper(vo)
|
||||||
input = InputHelper(vo.pointee.input_ctx, option)
|
input = InputHelper(vo.pointee.input_ctx, option)
|
||||||
|
|
||||||
if backendState == .uninitialized {
|
if backendState == .uninitialized {
|
||||||
|
@ -27,7 +27,7 @@ class MacCommon: Common {
|
|||||||
@objc init(_ vo: UnsafeMutablePointer<vo>) {
|
@objc init(_ vo: UnsafeMutablePointer<vo>) {
|
||||||
let newlog = mp_log_new(vo, vo.pointee.log, "mac")
|
let newlog = mp_log_new(vo, vo.pointee.log, "mac")
|
||||||
super.init(newlog)
|
super.init(newlog)
|
||||||
option = OptionHelper(vo, log)
|
option = OptionHelper(vo)
|
||||||
input = InputHelper(vo.pointee.input_ctx, option)
|
input = InputHelper(vo.pointee.input_ctx, option)
|
||||||
timer = PreciseTimer(common: self)
|
timer = PreciseTimer(common: self)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user