Skip to content

Commit bbae5bc

Browse files
fix rotation bug in LVGL v9.2.0
1 parent d74169e commit bbae5bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,14 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
243243
if (rotation != LV_DISPLAY_ROTATION_0) {
244244
rotated_buf = (uint8_t*)realloc(rotated_buf, w * h * 4);
245245
lv_color_format_t cf = lv_display_get_color_format(disp);
246+
#if (LVGL_VERSION_MINOR < 2)
247+
rotation = LV_DISPLAY_ROTATION_90; // bugfix: force 90 degree rotation for lvgl 9.1 end earlier
248+
#endif
246249
lv_draw_sw_rotate(px_map, rotated_buf,
247250
w, h, lv_draw_buf_width_to_stride(w, cf),
248251
lv_draw_buf_width_to_stride(h, cf),
249-
LV_DISPLAY_ROTATION_90, cf);
252+
rotation, cf);
253+
250254
rotated_area.x1 = lv_display_get_vertical_resolution(disp) - area->y2 - 1;
251255
rotated_area.y1 = area->x1;
252256
//rotated_area.y2 = dsi_getDisplayYSize() - area->x1 - 1;

0 commit comments

Comments
 (0)