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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user