mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(fb): set DPI to correctly (#5508)
This commit is contained in:
parent
9d71404e5c
commit
4ee9d3d295
@ -93,7 +93,7 @@ lv_display_t * lv_linux_fbdev_create(void)
|
||||
{
|
||||
static bool inited = false;
|
||||
if(!inited) {
|
||||
lv_tick_set_cb(tick_get_cb),
|
||||
lv_tick_set_cb(tick_get_cb);
|
||||
inited = true;
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ void lv_linux_fbdev_set_file(lv_display_t * disp, const char * file)
|
||||
lv_display_set_buffers(disp, draw_buf, draw_buf_2, draw_buf_size, LV_LINUX_FBDEV_RENDER_MODE);
|
||||
lv_display_set_resolution(disp, hor_res, ver_res);
|
||||
|
||||
if(width) {
|
||||
if(width > 0) {
|
||||
lv_display_set_dpi(disp, DIV_ROUND_UP(hor_res * 254, width * 10));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user