mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-31 07:56:23 +08:00
fix(imgfont) add user_data argument to callback (#3630)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user