Commit 31140f02 authored by David Fuhrmann's avatar David Fuhrmann

macosx: cleanup filters config during upgrade from 2.2.x to 3.0

VLC 2.2.x fully controlled VLCs audio or videofilter-related config
variables with the filter dialogs and the video or audio effects
panel overwrote any changes from config with the values from the

In VLC 3.0, the config is left alone and filter parameters
are only read from the preset strings. Additionally, by default
the Default profile (with default off settings) will be loaded at
startup, to ensure that no filters accidentially stay enabled.

Therefore, for migration, from 2.2.x to 3.0 versions, lets clear
the audio-filter and video-filter variables. Users with custom
profiles still keep their settings.

close #19260
parent d0fe23e6
......@@ -29,6 +29,8 @@
#include <unistd.h> /* execl() */
#import <vlc_interface.h>
@implementation VLCMain(OldPrefs)
static NSString * kVLCPreferencesVersion = @"VLCPreferencesVersion";
......@@ -83,11 +85,21 @@ static const int kCurrentPreferencesVersion = 4;
} else if (version == 3) {
/* version 4 (introduced in 3.0.0) adds RTL settings depending on stored language */
[defaults setInteger:kCurrentPreferencesVersion forKey:kVLCPreferencesVersion];
BOOL hasUpdated = [VLCSimplePrefsController updateRightToLeftSettings];
[defaults synchronize];
// In VLC 2.2.x, config for filters was fully controlled by audio and video effects panel.
// In VLC 3.0, this is no longer the case and VLCs config is not touched anymore. Therefore,
// disable filter in VLCs config in this transition.
playlist_t *p_playlist = pl_Get(getIntf());
var_SetString(p_playlist, "audio-filter", "");
var_SetString(p_playlist, "video-filter", "");
config_PutPsz(getIntf(), "audio-filter", "");
config_PutPsz(getIntf(), "video-filter", "");
// This migration only has effect rarely, therefore only restart then
if (!hasUpdated)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment