Skip to content

Commit 0e3dc0d

Browse files
committed
lvgl9: restore original rotation for landscape
1 parent a12c8c7 commit 0e3dc0d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ int Arduino_H7_Video::begin() {
111111
lv_display_t *display;
112112
if(_rotated) {
113113
display = lv_display_create(height(), width());
114-
lv_display_set_rotation(display, LV_DISPLAY_ROTATION_90);
114+
lv_display_set_rotation(display, LV_DISPLAY_ROTATION_270);
115115
//display->sw_rotate = 1;
116116
} else {
117117
display = lv_display_create(width(), height());
@@ -246,12 +246,12 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
246246
lv_draw_sw_rotate(px_map, rotated_buf,
247247
w, h, lv_draw_buf_width_to_stride(w, cf),
248248
lv_draw_buf_width_to_stride(h, cf),
249-
LV_DISPLAY_ROTATION_270, cf);
250-
rotated_area.x1 = area->y1;
251-
rotated_area.y2 = lv_display_get_horizontal_resolution(disp) - area->x1 - 1;
249+
LV_DISPLAY_ROTATION_90, cf);
250+
rotated_area.x1 = lv_display_get_vertical_resolution(disp) - area->y2 - 1;
251+
rotated_area.y1 = area->x1;
252252
//rotated_area.y2 = dsi_getDisplayYSize() - area->x1 - 1;
253253
rotated_area.x2 = rotated_area.x1 + h - 1;
254-
rotated_area.y1 = rotated_area.y2 - w + 1;
254+
rotated_area.y2 = rotated_area.y1 + w + 1;
255255

256256
area_in_use = &rotated_area;
257257
px_map = rotated_buf;

0 commit comments

Comments
 (0)