Skip to content

Commit eb62ddf

Browse files
authored
fix(display): update the color format of the draw buffers on color format change (lvgl#5973)
1 parent 47ec278 commit eb62ddf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/display/lv_display.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ void lv_display_set_color_format(lv_display_t * disp, lv_color_format_t color_fo
457457

458458
disp->color_format = color_format;
459459
disp->layer_head->color_format = color_format;
460+
if(disp->buf_1) disp->buf_1->header.cf = color_format;
461+
if(disp->buf_2) disp->buf_2->header.cf = color_format;
460462

461463
lv_display_send_event(disp, LV_EVENT_COLOR_FORMAT_CHANGED, NULL);
462464
}

0 commit comments

Comments
 (0)