- (void)removeOldPreferences
{
static NSString * kVLCPreferencesVersion = @"VLCPreferencesVersion";
- static const int kCurrentPreferencesVersion = 2;
+ static const int kCurrentPreferencesVersion = 3;
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
int version = [defaults integerForKey:kVLCPreferencesVersion];
if (version >= kCurrentPreferencesVersion)
return;
else
config_SaveConfigFile(VLCIntf); // we need to do manually, since we won't quit libvlc cleanly
+ } else if (version == 2) {
+ /* version 2 (used by VLC 2.0.x and early versions of 2.1) can lead to exceptions within 2.1 or later
+ * so we reset the OS X specific prefs here - in practice, no user will notice */
+ [NSUserDefaults resetStandardUserDefaults];
+
+ [defaults setInteger:kCurrentPreferencesVersion forKey:kVLCPreferencesVersion];
+ [defaults synchronize];
} else {
NSArray *libraries = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
NSUserDomainMask, YES);