Use enum for damage debug options

This commit is contained in:
Ryan Dwyer 2018-08-19 11:29:59 +10:00
parent 8d1dd03823
commit f9563d88f3
4 changed files with 14 additions and 12 deletions

View file

@ -235,12 +235,12 @@ static void drop_permissions(bool keep_caps) {
}
void enable_debug_flag(const char *flag) {
if (strcmp(flag, "highlight-damage") == 0) {
debug.highlight_damage = true;
if (strcmp(flag, "damage=highlight") == 0) {
debug.damage = DAMAGE_HIGHLIGHT;
} else if (strcmp(flag, "damage=rerender") == 0) {
debug.damage = DAMAGE_RERENDER;
} else if (strcmp(flag, "noatomic") == 0) {
debug.noatomic = true;
} else if (strcmp(flag, "nodamage") == 0) {
debug.nodamage = true;
} else if (strcmp(flag, "render-tree") == 0) {
debug.render_tree = true;
} else if (strcmp(flag, "txn-wait") == 0) {