common: DYESUB_BACKEND now checked as well as BACKEND envvar

This commit is contained in:
Solomon Peachy 2021-02-07 11:29:56 -05:00
parent c78d92ba39
commit cd21dea6a1
1 changed files with 4 additions and 4 deletions

View File

@ -1018,10 +1018,8 @@ void print_help(const char *argv0, const struct dyesub_backend *backend)
const char *ptr = getenv("BACKEND");
if (!ptr)
ptr = strrchr(argv0, '/');
if (ptr)
ptr++;
else
ptr = getenv("DYESUB_BACKEND");
if (!ptr)
ptr = argv0;
if (!backend)
@ -1291,6 +1289,8 @@ int main (int argc, char **argv)
extra_type = atoi(getenv("EXTRA_TYPE"));
if (getenv("BACKEND"))
backend_str = getenv("BACKEND");
else if (getenv("DYESUB_BACKEND"))
backend_str = getenv("DYESUB_BACKEND");
if (getenv("FAST_RETURN"))
fast_return++;
if (getenv("MAX_XFER_SIZE"))