Fix build

This commit is contained in:
Willy-JL
2023-08-29 02:38:05 +02:00
parent 3af56c2af8
commit 0ec8c85481
2 changed files with 8 additions and 4 deletions

View File

@@ -127,7 +127,8 @@ bool mass_storage_scene_create_image_on_event(void* context, SceneManagerEvent e
const char* error = NULL; const char* error = NULL;
bool success = false; bool success = false;
uint8_t* buffer = malloc(WRITE_BUF_LEN); size_t wipe_4k = 4096;
uint8_t* buffer = malloc(wipe_4k);
do { do {
if(!storage_file_open( if(!storage_file_open(
app->file, app->file,
@@ -138,11 +139,11 @@ bool mass_storage_scene_create_image_on_event(void* context, SceneManagerEvent e
uint64_t size = image_sizes[app->create_image_size].value; uint64_t size = image_sizes[app->create_image_size].value;
if(size == app->create_image_max) size--; if(size == app->create_image_max) size--;
if(!storage_file_seek(file, size, true)) break; if(!storage_file_seek(app->file, size, true)) break;
// Zero out first 4k - partition table and adjacent data // Zero out first 4k - partition table and adjacent data
if(!storage_file_seek(file, 0, true)) break; if(!storage_file_seek(app->file, 0, true)) break;
if(!storage_file_write(file, buffer, WRITE_BUF_LEN)) break; if(!storage_file_write(app->file, buffer, wipe_4k)) break;
success = true; success = true;
} while(false); } while(false);

View File

@@ -3525,6 +3525,9 @@ Variable,+,I_mute_text_19x5,Icon,
Variable,+,I_next_19x20,Icon, Variable,+,I_next_19x20,Icon,
Variable,+,I_next_hover_19x20,Icon, Variable,+,I_next_hover_19x20,Icon,
Variable,+,I_next_text_19x6,Icon, Variable,+,I_next_text_19x6,Icon,
Variable,+,I_off_19x20,Icon,
Variable,+,I_off_hover_19x20,Icon,
Variable,+,I_off_text_12x5,Icon,
Variable,+,I_passport_DB,Icon, Variable,+,I_passport_DB,Icon,
Variable,+,I_passport_bad_46x49,Icon, Variable,+,I_passport_bad_46x49,Icon,
Variable,+,I_passport_happy_46x49,Icon, Variable,+,I_passport_happy_46x49,Icon,
1 entry status name type params
3525 Variable + I_next_19x20 Icon
3526 Variable + I_next_hover_19x20 Icon
3527 Variable + I_next_text_19x6 Icon
3528 Variable + I_off_19x20 Icon
3529 Variable + I_off_hover_19x20 Icon
3530 Variable + I_off_text_12x5 Icon
3531 Variable + I_passport_DB Icon
3532 Variable + I_passport_bad_46x49 Icon
3533 Variable + I_passport_happy_46x49 Icon