Report error for setting vsync to non-boolean values

This is deprecated since v5, but we forgot to change this to error in
v8.

Doing it now.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2022-01-24 18:49:18 +00:00
parent 73f66c7d5d
commit b65c8c775f
2 changed files with 10 additions and 10 deletions

View File

@@ -636,11 +636,11 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
break;
case 270:
if (optarg) {
opt->vsync = parse_vsync(optarg);
log_warn("--vsync doesn't take argument anymore. \"%s\" "
"is interpreted as \"%s\" for compatibility, but "
"this will stop working soon",
optarg, opt->vsync ? "true" : "false");
bool parsed_vsync = parse_vsync(optarg);
log_error("--vsync doesn't take argument anymore. \"%s\" "
"should be changed to \"%s\"",
optarg, parsed_vsync ? "true" : "false");
failed = true;
} else {
opt->vsync = true;
}