This commit is contained in:
Willy-JL
2023-02-13 01:40:49 +00:00
parent 85d5e8a010
commit 5ed6abc4f7
3 changed files with 9 additions and 5 deletions

View File

@@ -5,7 +5,8 @@
#define SPI_MEM_DEVELOPER "DrunkBatya"
#define SPI_MEM_GITHUB "https://github.com/flipperdevices/flipperzero-firmware"
#define SPI_MEM_NAME "\e#\e! SPI Mem Manager \e!\n" // NOSONAR
#define SPI_MEM_BLANK_INV "\e#\e! \e!\n" // NOSONAR
#define SPI_MEM_BLANK_INV \
"\e#\e! \e!\n" // NOSONAR
void spi_mem_scene_about_on_enter(void* context) {
SPIMemApp* app = context;

View File

@@ -338,7 +338,8 @@ static bool animation_storage_load_frames(
frames_ok = false;
furi_string_printf(filename, "%s/%s/frame_%d.bm", ANIMATION_DIR, name, i);
do {
if(storage_common_stat(storage, furi_string_get_cstr(filename), &file_info) != FSE_OK)
if(storage_common_stat(storage, furi_string_get_cstr(filename), &file_info) !=
FSE_OK)
break;
if(file_info.size > max_filesize) {
FURI_LOG_E(
@@ -351,13 +352,14 @@ static bool animation_storage_load_frames(
break;
}
if(!storage_file_open(
file, furi_string_get_cstr(filename), FSAM_READ, FSOM_OPEN_EXISTING)) {
file, furi_string_get_cstr(filename), FSAM_READ, FSOM_OPEN_EXISTING)) {
FURI_LOG_E(TAG, "Can't open file \'%s\'", furi_string_get_cstr(filename));
break;
}
FURI_CONST_ASSIGN_PTR(icon->frames[i], malloc(file_info.size));
if(storage_file_read(file, (void*)icon->frames[i], file_info.size) != file_info.size) {
if(storage_file_read(file, (void*)icon->frames[i], file_info.size) !=
file_info.size) {
FURI_LOG_E(TAG, "Read failed: \'%s\'", furi_string_get_cstr(filename));
break;
} else {

View File

@@ -33,7 +33,8 @@ void anim(const Icon** replace, const char* name, FuriString* path, File* file)
ok = false;
furi_string_printf(path, ICONS_FMT "/frame_%02d.bm", pack, name, i);
do {
if(!storage_file_open(file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING))
if(!storage_file_open(
file, furi_string_get_cstr(path), FSAM_READ, FSOM_OPEN_EXISTING))
break;
uint64_t size = storage_file_size(file);