From bb1b0a9f42dabbaa196266fc11fddede74845877 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Mar 2014 21:46:29 +0100 Subject: player: remove confusing argc/argv adjustment It's better if argc/argv always mean the same thing. --- options/parse_commandline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'options/parse_commandline.c') diff --git a/options/parse_commandline.c b/options/parse_commandline.c index 8db144241e..17b3f9254a 100644 --- a/options/parse_commandline.c +++ b/options/parse_commandline.c @@ -128,7 +128,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, mode = GLOBAL; - struct parse_state p = {config, argc, argv}; + struct parse_state p = {config, argc - 1, argv + 1}; while (split_opt(&p)) { if (p.is_opt) { int flags = M_SETOPT_FROM_CMDLINE; @@ -274,7 +274,7 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa // Hack to shut up parser error messages mp_msg_mute(global, true); - struct parse_state p = {config, argc, argv}; + struct parse_state p = {config, argc - 1, argv + 1}; while (split_opt_silent(&p) == 0) { if (p.is_opt) { // Ignore non-pre-parse options. They will be set later. -- cgit v1.2.3