paint: cleanup

This commit is contained in:
luboslenco
2026-06-04 11:00:05 +02:00
parent a940b75f90
commit 114efb2458
183 changed files with 637 additions and 632 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "../global.h"
void import_keymap_run(char *path) {
if (!path_is_json(path)) {
console_error(strings_unknown_asset_format());
return;
}
char *filename = substring(path, string_last_index_of(path, PATH_SEP) + 1, string_length(path));
char *dst_path = string("%s%skeymap_presets%s%s", path_data(), PATH_SEP, PATH_SEP, filename);
file_copy(path, dst_path); // Copy to preset folder
box_preferences_fetch_keymaps(); // Refresh file list
box_preferences_h_preset->i = box_preferences_get_preset_index();
console_info(string("%s %s", tr("Keymap imported:"), filename));
}