Merge pull request #14952 from s-hadinger/lvgl_freetype_fixes

LVGL small fix
This commit is contained in:
s-hadinger 2022-02-23 12:45:17 +01:00 committed by GitHub
commit 0a2e6fd4ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 9 deletions

View File

@ -305,7 +305,7 @@ int be_check_arg_type(bvm *vm, int arg_start, int argc, const char * arg_type, i
// special case when first parameter is '@', pass pointer to VM // special case when first parameter is '@', pass pointer to VM
if (NULL != arg_type && arg_type[arg_idx] == '@') { if (NULL != arg_type && arg_type[arg_idx] == '@') {
arg_idx++; arg_idx++;
p[p_idx] = vm; p[p_idx] = (intptr_t) vm;
p_idx++; p_idx++;
} }

View File

@ -0,0 +1,20 @@
# Tasmota patches
Following patches need to be applied when updating LVGL:
`src/extra/libs/lv_extra.c`
Comment the `lv_freetype_init()` portion. The actual initializatio is done in Tasmota code
because parameters depend on Tasmota defines and presence of PSRAM.
``` C
// TASMOTA Specific, the initialization is done in Tasmota code to adjust with PSRAM
// #if LV_USE_FREETYPE
// /*Init freetype library*/
// # if LV_FREETYPE_CACHE_SIZE >= 0
// lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE);
// # else
// lv_freetype_init(0, 0, 0);
// # endif
// #endif
```

View File

@ -70,14 +70,15 @@ void lv_extra_init(void)
lv_bmp_init(); lv_bmp_init();
#endif #endif
#if LV_USE_FREETYPE // TASMOTA Specific, the initialization is done in Tasmota code to adjust with PSRAM
/*Init freetype library*/ // #if LV_USE_FREETYPE
# if LV_FREETYPE_CACHE_SIZE >= 0 // /*Init freetype library*/
lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE); // # if LV_FREETYPE_CACHE_SIZE >= 0
# else // lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE);
lv_freetype_init(0, 0, 0); // # else
# endif // lv_freetype_init(0, 0, 0);
#endif // # endif
// #endif
#if LV_USE_FFMPEG #if LV_USE_FFMPEG
lv_ffmpeg_init(); lv_ffmpeg_init();