vlc/vlc-3.0 | branch: master | David Fuhrmann <[email protected]> | Sun Dec 10 17:22:00 2017 +0100| [4a26032563523669bf8c5293bae99d31e7fc34e8] | committer: David Fuhrmann
macosx: audio effects: Explain reasoning for UI manipulation in init In init, the window is not loaded yet, so changing UI elements does not work yet (pointers are null). It does not harm either, due to objc behaviour on null object. But it also initializes the needed playlist variables. In the longer term, this should probably be splitted, as touching lots of non-existing UI elements in init is not ideal. (cherry picked from commit 4873ca47648fb7cbe80a00681b9ea65767e5f70a) Signed-off-by: David Fuhrmann <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4a26032563523669bf8c5293bae99d31e7fc34e8 --- modules/gui/macosx/VLCAudioEffectsWindowController.m | 2 ++ modules/gui/macosx/VLCVideoEffectsWindowController.m | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.m b/modules/gui/macosx/VLCAudioEffectsWindowController.m index b0d5c18cc8..445e886007 100644 --- a/modules/gui/macosx/VLCAudioEffectsWindowController.m +++ b/modules/gui/macosx/VLCAudioEffectsWindowController.m @@ -98,10 +98,12 @@ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if ([defaults boolForKey:@"AudioEffectApplyProfileOnStartup"]) { + // This does not reset the UI (which does not exist yet), but it initalizes needed playlist vars [self equalizerUpdated]; [self resetCompressor]; [self resetSpatializer]; [self resetAudioFilters]; + [self loadProfile]; } else diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m index 303b288c72..7eb59cc697 100644 --- a/modules/gui/macosx/VLCVideoEffectsWindowController.m +++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m @@ -71,7 +71,9 @@ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if ([defaults boolForKey:@"VideoEffectApplyProfileOnStartup"]) { + // This does not reset the UI (which does not exist yet), but it initalizes needed playlist vars [self resetValues]; + [self loadProfile]; } else _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
