From b8b7e291564985f34bd232acd836154378bff589 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 24 May 2024 22:58:41 +0200 Subject: [PATCH] feat(refr): add backward compatibility for LV_COLOR_16_SWAP (#6225) --- src/core/lv_refr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 7babe8857..11e1d4b41 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -1060,6 +1060,12 @@ static void call_flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * }; lv_display_send_event(disp, LV_EVENT_FLUSH_START, &offset_area); + + /*For backward compatibility support LV_COLOR_16_SWAP (from v8)*/ +#if defined(LV_COLOR_16_SWAP) && LV_COLOR_16_SWAP + lv_draw_sw_rgb565_swap(px_map, lv_area_get_size(&offset_area)); +#endif + disp->flush_cb(disp, &offset_area, px_map); lv_display_send_event(disp, LV_EVENT_FLUSH_FINISH, &offset_area);