vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrm...@videolan.org> | Sat 
Dec  9 21:09:44 2017 +0100| [4749cd00a222d81fe11282fa11a332c0e7634f56] | 
committer: David Fuhrmann

macosx: Do not lazy-load audio and video effect controllers anymore

Those need to be loaded at startup now, to make sure stored
profiles are correctly applied, even before the panels are opened.

Previously (VLC 2.2.x), a saved profile was mirrored into the
respective VLC config options, thus it was not needed before.
this is not done anymore.

refs #19260

(cherry picked from commit 7798c907f373d1b543ace74f58bf9966a50ed592)
Signed-off-by: David Fuhrmann <dfuhrm...@videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4749cd00a222d81fe11282fa11a332c0e7634f56
---

 modules/gui/macosx/VLCMain.m | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/gui/macosx/VLCMain.m b/modules/gui/macosx/VLCMain.m
index 6a77dab9f3..16e8656b05 100644
--- a/modules/gui/macosx/VLCMain.m
+++ b/modules/gui/macosx/VLCMain.m
@@ -238,6 +238,10 @@ static VLCMain *sharedInstance = nil;
         var_AddCallback(p_intf->obj.libvlc, "intf-toggle-fscontrol", 
ShowController, (__bridge void *)self);
         var_AddCallback(p_intf->obj.libvlc, "intf-show", ShowController, 
(__bridge void *)self);
 
+        // Load them here already to apply stored profiles
+        _videoEffectsPanel = [[VLCVideoEffectsWindowController alloc] init];
+        _audioEffectsPanel = [[VLCAudioEffectsWindowController alloc] init];
+
         playlist_t *p_playlist = pl_Get(p_intf);
         if ([NSApp currentSystemPresentationOptions] & 
NSApplicationPresentationFullScreen)
             var_SetBool(p_playlist, "fullscreen", YES);
@@ -509,17 +513,11 @@ static VLCMain *sharedInstance = nil;
 
 - (VLCAudioEffectsWindowController *)audioEffectsPanel
 {
-    if (!_audioEffectsPanel)
-        _audioEffectsPanel = [[VLCAudioEffectsWindowController alloc] init];
-
     return _audioEffectsPanel;
 }
 
 - (VLCVideoEffectsWindowController *)videoEffectsPanel
 {
-    if (!_videoEffectsPanel)
-        _videoEffectsPanel = [[VLCVideoEffectsWindowController alloc] init];
-
     return _videoEffectsPanel;
 }
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to