Skip to content

Commit 3058ee8

Browse files
committed
Add internal fs path for nametag
1 parent 440cb2c commit 3058ee8

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

main/menu/home.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void menu_home(pax_buf_t* buffer, gui_theme_t* theme) {
122122
menu_t menu = {0};
123123
menu_initialize(&menu);
124124
menu_insert_item_icon(&menu, "Apps", NULL, (void*)ACTION_APPS, -1, get_icon(ICON_APPS));
125-
if (access("/sd/nametag.png", F_OK) == 0) {
125+
if (access("/sd/nametag.png", F_OK) == 0 || access("/int/nametag.png", F_OK) == 0) {
126126
menu_insert_item_icon(&menu, "Nametag", NULL, (void*)ACTION_NAMETAG, -1, get_icon(ICON_TAG));
127127
}
128128
menu_insert_item_icon(&menu, "Repository", NULL, (void*)ACTION_REPOSITORY, -1, get_icon(ICON_REPOSITORY));

main/menu/nametag.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ static bool load_nametag(void) {
4242
}*/
4343
FILE* fd = fopen("/sd/nametag.png", "rb");
4444
if (fd == NULL) {
45-
ESP_LOGE(TAG, "Failed to open file");
46-
// free(nametag_buffer);
47-
// nametag_buffer = NULL;
48-
return false;
45+
fd = fopen("/int/nametag.png", "rb");
46+
if (fd == NULL) {
47+
ESP_LOGE(TAG, "Failed to open file");
48+
// free(nametag_buffer);
49+
// nametag_buffer = NULL;
50+
return false;
51+
}
4952
}
5053
// pax_buf_init(&nametag_pax_buf, &nametag_buffer, 800, 480, PAX_BUF_32_8888ARGB);
5154
if (!pax_decode_png_fd(&nametag_pax_buf, fd, PAX_BUF_32_8888ARGB, 0)) { // CODEC_FLAG_EXISTING)) {

0 commit comments

Comments
 (0)