@@ -111,7 +111,7 @@ int Arduino_H7_Video::begin() {
111
111
lv_display_t *display;
112
112
if (_rotated) {
113
113
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 );
115
115
// display->sw_rotate = 1;
116
116
} else {
117
117
display = lv_display_create (width (), height ());
@@ -246,12 +246,12 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
246
246
lv_draw_sw_rotate (px_map, rotated_buf,
247
247
w, h, lv_draw_buf_width_to_stride (w, cf),
248
248
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 ;
252
252
// rotated_area.y2 = dsi_getDisplayYSize() - area->x1 - 1;
253
253
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 ;
255
255
256
256
area_in_use = &rotated_area;
257
257
px_map = rotated_buf;
0 commit comments