Skip to content

Commit

Permalink
fix resolution check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ballaswag committed Jan 10, 2024
1 parent 11ed082 commit 168b992
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 168b992

Please sign in to comment.