mirror of https://github.com/mpv-player/mpv
video/out/gpu/context: simplify --gpu-context's check_unknown_entry
This function is used to reject invalid context names early, and without it the context fails to create and only audio is played, but it doesn't need to check for known entries again.
This commit is contained in:
parent
e78e2c73cf
commit
3f43999bd6
|
@ -154,11 +154,6 @@ static bool get_desc(struct m_obj_desc *dst, int index)
|
|||
|
||||
static bool check_unknown_entry(const char *name)
|
||||
{
|
||||
struct bstr param = bstr0(name);
|
||||
for (int i = 0; i < MP_ARRAY_SIZE(contexts); i++) {
|
||||
if (bstr_equals0(param, contexts[i]->name))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue