diff --git a/examples/others/imgfont/lv_example_imgfont_1.c b/examples/others/imgfont/lv_example_imgfont_1.c index 81d75cdb6..221043634 100644 --- a/examples/others/imgfont/lv_example_imgfont_1.c +++ b/examples/others/imgfont/lv_example_imgfont_1.c @@ -14,12 +14,18 @@ static bool get_imgfont_path(const lv_font_t * font, void * img_src, LV_UNUSED(user_data); LV_ASSERT_NULL(img_src); + if(unicode < 0xF000) return false; + if(unicode == 0xF617) { memcpy(img_src, &emoji_F617, sizeof(lv_img_dsc_t)); } else { char * path = (char *)img_src; - snprintf(path, len, "%s/%04"LV_PRIX32".%s", "A:lvgl/examples/assets/emoji", unicode, "png"); +#if LV_USE_FFMPEG + snprintf(path, len, "%s/%04X.%s", "lvgl/examples/assets/emoji", unicode, "png"); +#elif LV_USE_PNG + snprintf(path, len, "%s/%04X.%s", "A:lvgl/examples/assets/emoji", unicode, "png"); +#endif path[len - 1] = '\0'; } diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 7366f75d4..553438dc1 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -218,10 +218,6 @@ void lv_init(void) lv_fs_win32_init(); #endif -#if LV_USE_FFMPEG - lv_ffmpeg_init(); -#endif - #if LV_USE_PNG lv_png_init(); #endif @@ -234,6 +230,12 @@ void lv_init(void) lv_bmp_init(); #endif + /*Make FFMPEG last because the last converter will be checked first and + *it's superior to any other */ +#if LV_USE_FFMPEG + lv_ffmpeg_init(); +#endif + #if LV_USE_FREETYPE /*Init freetype library*/ # if LV_FREETYPE_CACHE_SIZE >= 0