]> git.sesse.net Git - vlc/commitdiff
* when config_ResetAll() a key config value becomes "Unset" (0) instead of
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 11 Nov 2003 21:23:56 +0000 (21:23 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 11 Nov 2003 21:23:56 +0000 (21:23 +0000)
  it's original value. With this you at least won't break your config file,
  because it comments out the value during saving, when it's identical to the,
  original value. The question however remains, why does a resetAll result
  in a 0 in the 'current' config in use, and in original value at time of saving?

src/misc/configuration.c

index 0e2033a1c6df8ce0cea97bb277743e111c66f048..249032bab89b39c570fcca67336802b98a77913b 100644 (file)
@@ -2,7 +2,7 @@
  * configuration.c management of the modules configuration
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.70 2003/11/08 18:23:40 titer Exp $
+ * $Id: configuration.c,v 1.71 2003/11/11 21:23:56 hartman Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -1120,6 +1120,8 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
                 if( p_item->psz_text )
                     fprintf( file, "# %s (%s)\n", p_item->psz_text,
                              _("key") );
+                if( p_item->i_value == p_item->i_value_orig )
+                    fprintf( file, "#" );
                 psz_key = ConfigKeyToString( p_item->i_value );
                 fprintf( file, "%s=%s\n", p_item->psz_name,
                          psz_key ? psz_key : "" );