From 44e49aee3ccd48459b9c242d296bf7056d2fcdb3 Mon Sep 17 00:00:00 2001 From: Akemi Date: Mon, 23 Jul 2018 11:31:01 +0200 Subject: cocoa-cb: move macOS option retrieval to the earliest point possible moved the retrieval of the macOS specific options from the backend initialisation to the initialisation of the CocoaCB class, the earliest point possible. this way macOS specific options can be used for the opengl context creation for example. --- osdep/macOS_mpv_helper.swift | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'osdep') diff --git a/osdep/macOS_mpv_helper.swift b/osdep/macOS_mpv_helper.swift index e1fb3cf6cb..a1bb03f508 100644 --- a/osdep/macOS_mpv_helper.swift +++ b/osdep/macOS_mpv_helper.swift @@ -45,6 +45,12 @@ class MPVHelper: NSObject { mpctx = UnsafeMutablePointer(mp_client_get_core(mpvHandle)) inputContext = mpctx!.pointee.input + if let app = NSApp as? Application { + let ptr = mp_get_config_group(mpctx!, mp_client_get_global(mpvHandle), + app.getMacOSConf()) + macOpts = UnsafeMutablePointer(OpaquePointer(ptr))!.pointee + } + mpv_observe_property(mpvHandle, 0, "ontop", MPV_FORMAT_FLAG) mpv_observe_property(mpvHandle, 0, "border", MPV_FORMAT_FLAG) mpv_observe_property(mpvHandle, 0, "keepaspect-window", MPV_FORMAT_FLAG) -- cgit v1.2.3