Changeset b61c8fdebdb1260da5b9baa47bd9f0245be11252
- Timestamp:
- 04/03/08 00:55:40 (5 months ago)
- git-parent:
- Files:
-
- src/libvlc-common.c (modified) (4 diffs)
- src/libvlc-module.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/libvlc-common.c
rf88f1a7 rb61c8fd 395 395 /* This ain't really nice to have to reload the config here but it seems 396 396 * the only way to do it. */ 397 config_LoadConfigFile( p_libvlc, "main" ); 397 398 if( !config_GetInt( p_libvlc, "ignore-config" ) ) 399 config_LoadConfigFile( p_libvlc, "main" ); 398 400 config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); 399 401 … … 412 414 module_EndBank( p_libvlc ); 413 415 module_InitBank( p_libvlc ); 414 config_LoadConfigFile( p_libvlc, "main" ); 416 if( !config_GetInt( p_libvlc, "ignore-config" ) ) 417 config_LoadConfigFile( p_libvlc, "main" ); 415 418 config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); 416 419 p_libvlc_global->p_module_bank->b_cache_delete = b_cache_delete; … … 466 469 467 470 /* Check for config file options */ 468 if( config_GetInt( p_libvlc, "reset-config" ) > 0 ) 469 { 470 config_ResetAll( p_libvlc ); 471 config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); 472 config_SaveConfigFile( p_libvlc, NULL ); 473 } 474 if( config_GetInt( p_libvlc, "save-config" ) > 0 ) 475 { 476 config_LoadConfigFile( p_libvlc, NULL ); 477 config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); 478 config_SaveConfigFile( p_libvlc, NULL ); 471 if( !config_GetInt( p_libvlc, "ignore-config" ) ) 472 { 473 if( config_GetInt( p_libvlc, "reset-config" ) > 0 ) 474 { 475 config_ResetAll( p_libvlc ); 476 config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); 477 config_SaveConfigFile( p_libvlc, NULL ); 478 } 479 if( config_GetInt( p_libvlc, "save-config" ) > 0 ) 480 { 481 config_LoadConfigFile( p_libvlc, NULL ); 482 config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); 483 config_SaveConfigFile( p_libvlc, NULL ); 484 } 479 485 } 480 486 … … 493 499 * Override default configuration with config file settings 494 500 */ 495 config_LoadConfigFile( p_libvlc, NULL ); 501 if( !config_GetInt( p_libvlc, "ignore-config" ) ) 502 config_LoadConfigFile( p_libvlc, NULL ); 496 503 497 504 /* src/libvlc-module.c
r885b6b8 rb61c8fd 2447 2447 N_("print help on a specific module (can be combined with --advanced " \ 2448 2448 "and --help-verbose)") 2449 #define IGNORE_CONFIG_TEXT \ 2450 N_("no configuration option will be loaded nor saved to config file") 2449 2451 #define SAVE_CONFIG_TEXT \ 2450 2452 N_("save the current command line options in the config") … … 2481 2483 add_string( "module", NULL, NULL, MODULE_TEXT, "", VLC_FALSE ); 2482 2484 change_short( 'p' ); 2485 change_internal(); 2486 change_unsaveable(); 2487 add_bool( "ignore-config", VLC_FALSE, NULL, IGNORE_CONFIG_TEXT, "", VLC_FALSE ); 2483 2488 change_internal(); 2484 2489 change_unsaveable();
