fix: allow use of the toggle argument for output allow_tearing

This commit is contained in:
Ricardo Steijn 2024-07-13 21:15:41 +02:00
parent a9ba469715
commit 3bb8cd62a4

View file

@ -10,7 +10,8 @@ struct cmd_results *output_cmd_allow_tearing(int argc, char **argv) {
return cmd_results_new(CMD_INVALID, "Missing allow_tearing argument"); return cmd_results_new(CMD_INVALID, "Missing allow_tearing argument");
} }
if (parse_boolean(argv[0], true)) { if (parse_boolean(argv[0],
(config->handler_context.output_config->allow_tearing == 1))) {
config->handler_context.output_config->allow_tearing = 1; config->handler_context.output_config->allow_tearing = 1;
} else { } else {
config->handler_context.output_config->allow_tearing = 0; config->handler_context.output_config->allow_tearing = 0;