mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(freetype): fix build break when disable LV_USE_FS_MEMFS (#5651)
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
parent
baf7fedc82
commit
09ff66b3a4
@ -360,15 +360,21 @@ static FTC_FaceID lv_freetype_req_face_id(lv_freetype_context_t * ctx, const cha
|
||||
node = _lv_ll_ins_tail(ll_p);
|
||||
LV_ASSERT_MALLOC(node);
|
||||
|
||||
if(LV_FS_MEMFS_LETTER == pathname[0]) {
|
||||
len = sizeof(lv_fs_path_ex_t);
|
||||
#if LV_USE_FS_MEMFS
|
||||
if(pathname[0] == LV_FS_MEMFS_LETTER) {
|
||||
#if !LV_FREETYPE_USE_LVGL_PORT
|
||||
LV_LOG_WARN("LV_FREETYPE_USE_LVGL_PORT is not enabled");
|
||||
#endif
|
||||
node->pathname = lv_malloc(sizeof(lv_fs_path_ex_t));
|
||||
LV_ASSERT_MALLOC(node->pathname);
|
||||
lv_memcpy(node->pathname, pathname, sizeof(lv_fs_path_ex_t));
|
||||
}
|
||||
else {
|
||||
len++;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
node->pathname = lv_strdup(pathname);
|
||||
LV_ASSERT_NULL(node->pathname);
|
||||
}
|
||||
node->pathname = lv_malloc(len);
|
||||
LV_ASSERT_MALLOC(node->pathname);
|
||||
memcpy(node->pathname, pathname, len);
|
||||
|
||||
LV_LOG_INFO("add face_id: %s", node->pathname);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user