fix(imgfont) add user_data argument to callback (#3630)

This commit is contained in:
Amir Gonnen
2022-08-27 16:31:33 +03:00
committed by GitHub
parent 00d92f152b
commit 75fabab38a
3 changed files with 11 additions and 6 deletions
@@ -6,10 +6,12 @@
LV_IMG_DECLARE(emoji_F617)
static bool get_imgfont_path(const lv_font_t * font, void * img_src,
uint16_t len, uint32_t unicode, uint32_t unicode_next)
uint16_t len, uint32_t unicode, uint32_t unicode_next,
void * user_data)
{
LV_UNUSED(font);
LV_UNUSED(unicode_next);
LV_UNUSED(user_data);
LV_ASSERT_NULL(img_src);
if(unicode == 0xF617) {
@@ -29,7 +31,7 @@ static bool get_imgfont_path(const lv_font_t * font, void * img_src,
*/
void lv_example_imgfont_1(void)
{
lv_font_t * imgfont = lv_imgfont_create(80, get_imgfont_path);
lv_font_t * imgfont = lv_imgfont_create(80, get_imgfont_path, NULL);
if(imgfont == NULL) {
LV_LOG_ERROR("imgfont init error");
}