From 168b992abe9fb92995fa5f6a195a0092445682d9 Mon Sep 17 00:00:00 2001 From: ballaswag Date: Tue, 9 Jan 2024 22:30:32 -0800 Subject: [PATCH] fix resolution check. --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 7d19cc1..ff11556 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -257,8 +257,10 @@ static void hal_init(void) { } lv_disp_drv_register(&disp_drv); + spdlog::debug("resolution {} x {}", width, height); + lv_disp_t * disp = lv_disp_drv_register(&disp_drv); - lv_theme_t * th = width <= 480 + lv_theme_t * th = height <= 480 ? lv_theme_default_init(NULL, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED), true, &lv_font_montserrat_12) : lv_theme_default_init(NULL, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED), true, &lv_font_montserrat_16); lv_disp_set_theme(disp, th);