1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(sysmon): fix LOG mode not printing (#4800)

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
_VIFEXTech 2023-11-13 23:49:08 +08:00 committed by GitHub
parent 91f133f11b
commit d23c4f72af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ static void perf_observer_cb(lv_subject_t * subject, lv_observer_t * observer)
const lv_sysmon_perf_info_t * perf = lv_subject_get_pointer(subject);
#if LV_USE_PERF_MONITOR_LOG_MODE
LV_UNUSED(label);
LV_LOG("sysmon: "
"%" LV_PRIu32 " FPS (refr_cnt: %" LV_PRIu32 " | redraw_cnt: %" LV_PRIu32 " | flush_cnt: %" LV_PRIu32 "), "
"refr %" LV_PRIu32 "ms (render %" LV_PRIu32 "ms | flush %" LV_PRIu32 "ms), "
@ -230,10 +230,11 @@ static void sysmon_backend_init_async_cb(void * user_data)
#if LV_USE_PERF_MONITOR
lv_display_add_event(lv_display_get_default(), perf_monitor_disp_event_cb, LV_EVENT_ALL, NULL);
#if !LV_USE_PERF_MONITOR_LOG_MODE
lv_obj_t * obj1 = lv_sysmon_create(lv_layer_sys());
lv_obj_align(obj1, LV_USE_PERF_MONITOR_POS, 0, 0);
lv_subject_add_observer_obj(&sysmon_perf.subject, perf_observer_cb, obj1, NULL);
#if LV_USE_PERF_MONITOR_LOG_MODE
lv_obj_add_flag(obj1, LV_OBJ_FLAG_HIDDEN);
#endif
#endif