mirror of https://github.com/mpv-player/mpv
parser-cfg: allow putting options with leading "--"
Now you can pretend the config file is quite literally command line values dumped into a file, e.g. --option1=value --option2=value ... although the underlying mechanisms are quite different.
This commit is contained in:
parent
c7dee24c8c
commit
cf02e515d4
|
@ -228,6 +228,9 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile,
|
|||
bstr bopt = bstr0(opt);
|
||||
bstr bparam = bstr0(param);
|
||||
|
||||
if (bopt.len >= 3)
|
||||
bstr_eatstart0(&bopt, "--");
|
||||
|
||||
if (profile && bstr_equals0(bopt, "profile-desc")) {
|
||||
m_profile_set_desc(profile, bparam);
|
||||
goto nextline;
|
||||
|
|
Loading…
Reference in New Issue