paint: cleanup

This commit is contained in:
luboslenco
2026-03-07 21:12:59 +01:00
parent 313378a923
commit 0e41ccbfa5
189 changed files with 4736 additions and 4488 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
void operator_register(string_t *name, void (*call)(void)) {
void operator_register(char *name, void (*call)(void)) {
any_map_set(operator_ops, name, call);
}
void operator_run(string_t *name) {
if (any_map_get(operator_ops, name) != null) {
void operator_run(char *name) {
if (any_map_get(operator_ops, name) != NULL) {
void (*cb)(void) = any_map_get(operator_ops, name);
cb();
}
@@ -13,7 +13,7 @@ void operator_update() {
if (mouse_started_any() || keyboard_started_any()) {
string_t_array_t *keys = map_keys(config_keymap);
for (i32 i = 0; i < keys->length; ++i) {
string_t *op = keys->buffer[i];
char *op = keys->buffer[i];
if (operator_shortcut(any_map_get(config_keymap, op), SHORTCUT_TYPE_STARTED)) {
operator_run(op);
}
@@ -21,7 +21,7 @@ void operator_update() {
}
}
bool operator_shortcut(string_t *s, shortcut_type_t type) {
bool operator_shortcut(char *s, shortcut_type_t type) {
if (string_equals(s, "")) {
return false;
}