Name changer in xfw app misc + small app fixes

This commit is contained in:
Willy-JL
2023-02-19 23:22:58 +00:00
parent e338db1392
commit 0f7a65dceb
7 changed files with 147 additions and 29 deletions

View File

@@ -13,8 +13,6 @@ void namechanger_on_system_start() {
FuriString* NAMEHEADER;
NAMEHEADER = furi_string_alloc_set("Flipper Name File");
FuriString* filepath;
filepath = furi_string_alloc_set("/ext/dolphin/name.txt");
bool result = false;
@@ -22,7 +20,7 @@ void namechanger_on_system_start() {
data = furi_string_alloc();
do {
if(!flipper_format_file_open_existing(file, furi_string_get_cstr(filepath))) {
if(!flipper_format_file_open_existing(file, NAMECHANGER_PATH)) {
break;
}
@@ -59,7 +57,7 @@ void namechanger_on_system_start() {
do {
// Open file for write
if(!flipper_format_file_open_always(file, furi_string_get_cstr(filepath))) {
if(!flipper_format_file_open_always(file, NAMECHANGER_PATH)) {
break;
}
@@ -109,7 +107,7 @@ void namechanger_on_system_start() {
do {
// Open file for write
if(!flipper_format_file_open_always(file, furi_string_get_cstr(filepath))) {
if(!flipper_format_file_open_always(file, NAMECHANGER_PATH)) {
break;
}
@@ -161,7 +159,6 @@ void namechanger_on_system_start() {
furi_string_free(data);
furi_string_free(filepath);
furi_record_close(RECORD_STORAGE);
}
}