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

@@ -448,11 +448,11 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
}
// --vsync
if (config_lookup_string(&cfg, "vsync", &sval)) {
opt->vsync = parse_vsync(sval);
log_warn("vsync option will take a boolean from now on. \"%s\" is "
"interpreted as \"%s\" for compatibility, but this will stop "
"working soon",
sval, opt->vsync ? "true" : "false");
bool parsed_vsync = parse_vsync(sval);
log_error("vsync option will take a boolean from now on. \"%s\" in "
"your configuration should be changed to \"%s\"",
sval, parsed_vsync ? "true" : "false");
goto err;
}
lcfg_lookup_bool(&cfg, "vsync", &opt->vsync);
// --backend

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;
}