vdisp/gl: gl_show_help only if :[full]help

Be more restrictive when parsing the help option - do not print the
master help eg. on size=help.
This commit is contained in:
Martin Pulec
2025-05-19 12:46:50 +02:00
parent 32bdfed7f0
commit 9c597ae19d

View File

@@ -699,14 +699,13 @@ list_hints()
}
static void *display_gl_parse_fmt(struct state_gl *s, char *ptr) {
if (strstr(ptr, "help") != 0) {
gl_show_help(strcmp(ptr, "fullhelp") == 0);
return INIT_NOERR;
}
char *tok, *save_ptr = NULL;
while((tok = strtok_r(ptr, ":", &save_ptr)) != NULL) {
if (strcmp(ptr, "help") == 0 || strcmp(ptr, "fullhelp") == 0) {
gl_show_help(strcmp(ptr, "fullhelp") == 0);
return INIT_NOERR;
}
if (!strcmp(tok, "d") || !strcmp(tok, "dforce")) {
s->deinterlace = !strcmp(tok, "d") ? state_gl::deint::on : state_gl::deint::force;
} else if(!strncmp(tok, "fs", 2)) {