diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-11 17:28:10 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-11 17:28:10 +0200 |
commit | b26fbeddd85aae6cda93d01335bed5f108a3ff57 (patch) | |
tree | 5f188a36267498b116eef50a60c8ca1f7f480822 /mplayer.c | |
parent | 0b59e33b4e17fae9e0c318fcfeabba52e57dda4a (diff) | |
download | mpv-b26fbeddd85aae6cda93d01335bed5f108a3ff57.tar.bz2 mpv-b26fbeddd85aae6cda93d01335bed5f108a3ff57.tar.xz |
options: move -noconfig to option struct, simplify
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -869,9 +869,10 @@ static int cfg_include(m_option_t *conf, char *filename) static void parse_cfgfiles(struct MPContext *mpctx, m_config_t* conf) { + struct MPOpts *opts = &mpctx->opts; char *conffile; int conffile_fd; -if (!disable_system_conf && + if (!(opts->noconfig & 2) && m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0) exit_player(mpctx, EXIT_NONE); if ((conffile = get_path("")) == NULL) { @@ -891,7 +892,7 @@ if ((conffile = get_path("")) == NULL) { write(conffile_fd, default_config, strlen(default_config)); close(conffile_fd); } - if (!disable_user_conf && + if (!(opts->noconfig & 1) && m_config_parse_config_file(conf, conffile) < 0) exit_player(mpctx, EXIT_NONE); free(conffile); |