1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(fbdev): set resolution prior to buffer (#6004)

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
This commit is contained in:
Jaeyoon Jung 2024-04-04 15:55:34 +09:00 committed by GitHub
parent 4fcf70828d
commit 29662d1c35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,8 +233,8 @@ void lv_linux_fbdev_set_file(lv_display_t * disp, const char * file)
draw_buf_2 = malloc(draw_buf_size);
}
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);
lv_display_set_buffers(disp, draw_buf, draw_buf_2, draw_buf_size, LV_LINUX_FBDEV_RENDER_MODE);
if(width > 0) {
lv_display_set_dpi(disp, DIV_ROUND_UP(hor_res * 254, width * 10));