From 45a39a11fef7df7fc7378b81539fb6e950be6550 Mon Sep 17 00:00:00 2001 From: Gabriel Wang Date: Sat, 7 May 2022 21:14:35 +0100 Subject: [PATCH] fix(benchmark): remove redundant string for the small screens (#3335) * fix(benchmark): remove redundant string for the small screens (i.e. <320 in width) * remove tail white-spaces --- demos/benchmark/lv_demo_benchmark.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/demos/benchmark/lv_demo_benchmark.c b/demos/benchmark/lv_demo_benchmark.c index 7746fcdff..a6656d749 100644 --- a/demos/benchmark/lv_demo_benchmark.c +++ b/demos/benchmark/lv_demo_benchmark.c @@ -875,13 +875,13 @@ static void report_cb(lv_timer_t * timer) } if(opa_mode) { - lv_label_set_text_fmt(subtitle, "Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name, + lv_label_set_text_fmt(subtitle, "Result : %"LV_PRId32" FPS", scenes[scene_act].fps_normal); LV_LOG("Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name, scenes[scene_act].fps_normal); } else if(scene_act > 0) { - lv_label_set_text_fmt(subtitle, "Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act - 1].name, + lv_label_set_text_fmt(subtitle, "Result : %"LV_PRId32" FPS", scenes[scene_act - 1].fps_opa); LV_LOG("Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act - 1].name, scenes[scene_act - 1].fps_opa); @@ -906,19 +906,7 @@ void lv_demo_benchmark_run_scene(int_fast16_t scene_no) if(scenes[scene_act].create_cb) { lv_label_set_text_fmt(title, "%"LV_PRId32"/%d: %s%s", scene_act * 2 + (opa_mode ? 1 : 0), (int)(dimof(scenes) * 2) - 2, scenes[scene_act].name, opa_mode ? " + opa" : ""); - if(opa_mode) { - lv_label_set_text_fmt(subtitle, "Result of \"%s\": %"LV_PRId32" FPS", scenes[scene_act].name, - scenes[scene_act].fps_normal); - } - else { - if(scene_act > 0) { - lv_label_set_text_fmt(subtitle, "Result of \"%s + opa\": %"LV_PRId32" FPS", scenes[scene_act - 1].name, - scenes[scene_act - 1].fps_opa); - } - else { - lv_label_set_text(subtitle, ""); - } - } + lv_label_set_text(subtitle, ""); rnd_reset(); scenes[scene_act].create_cb();