mirror of https://github.com/mpv-player/mpv
m_option: remove unneded compatibility features
Aliases that set old options are not needed anymore. Also extend the total size of the aliases array for one of the following commits.
This commit is contained in:
parent
d6921678b9
commit
e76fda8594
|
@ -2623,16 +2623,9 @@ bool m_obj_list_find(struct m_obj_desc *dst, const struct m_obj_list *l,
|
||||||
for (int i = 0; l->aliases[i][0]; i++) {
|
for (int i = 0; l->aliases[i][0]; i++) {
|
||||||
const char *aname = l->aliases[i][0];
|
const char *aname = l->aliases[i][0];
|
||||||
const char *alias = l->aliases[i][1];
|
const char *alias = l->aliases[i][1];
|
||||||
const char *opts = l->aliases[i][2];
|
|
||||||
if (bstr_equals0(name, aname) && m_obj_list_find(dst, l, bstr0(alias)))
|
if (bstr_equals0(name, aname) && m_obj_list_find(dst, l, bstr0(alias)))
|
||||||
{
|
{
|
||||||
if (opts) {
|
|
||||||
dst->init_options = opts;
|
|
||||||
} else {
|
|
||||||
// Assume it's deprecated in this case.
|
|
||||||
// Also, it's used by the VO code only, so whatever.
|
|
||||||
dst->replaced_name = aname;
|
dst->replaced_name = aname;
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ struct m_obj_list {
|
||||||
bool (*get_desc)(struct m_obj_desc *dst, int index);
|
bool (*get_desc)(struct m_obj_desc *dst, int index);
|
||||||
const char *description;
|
const char *description;
|
||||||
// Can be set to a NULL terminated array of aliases
|
// Can be set to a NULL terminated array of aliases
|
||||||
const char *aliases[4][5];
|
const char *aliases[5][2];
|
||||||
// Allow a trailing ",", which adds an entry with name=""
|
// Allow a trailing ",", which adds an entry with name=""
|
||||||
bool allow_trailer;
|
bool allow_trailer;
|
||||||
// Allow unknown entries, for which a dummy entry is inserted, and whose
|
// Allow unknown entries, for which a dummy entry is inserted, and whose
|
||||||
|
|
Loading…
Reference in New Issue