From 91f6f2bf11af3705e55f16fef6379f4b2092a19d Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Apr 2015 21:08:19 +0200 Subject: options: remove unneeded hack from command line parser This was traditionally needed to silence terminal output from errors during command line parsing preparsing. Preparsing is done so that options controlling the terminal and config files are parsed and applied first, with a second command line parsing pass applying all other options, _and_ printing error messages for the preparsed ones. But the hack silencing log output during the preparse pass is actually not needed anymore, since the terminal is enabled only after preparsing is finished. update_logging() in main.c does this. So as long as update_logging() is called before m_config_preparse_command_line(), this will work. --- options/parse_commandline.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'options') diff --git a/options/parse_commandline.c b/options/parse_commandline.c index 5145a8c03b..ab1f28f72b 100644 --- a/options/parse_commandline.c +++ b/options/parse_commandline.c @@ -285,9 +285,6 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa { struct MPOpts *opts = global->opts; - // Hack to shut up parser error messages - mp_msg_mute(global, true); - struct parse_state p = {config, argv}; while (split_opt_silent(&p) == 0) { if (p.is_opt) { @@ -300,8 +297,6 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa } } - mp_msg_mute(global, false); - for (int n = 0; n < config->num_opts; n++) config->opts[n].warning_was_printed = false; } -- cgit v1.2.3