[lvgl] Fix rotation code for 90deg (Bugfix) (#7653)

This commit is contained in:
Clyde Stubbs 2024-10-22 14:06:58 +11:00 committed by GitHub
parent ff48f53989
commit 3ac730fb2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,7 +146,7 @@ void LvglComponent::draw_buffer_(const lv_area_t *area, lv_color_t *ptr) {
lv_color_t *dst = this->rotate_buf_;
switch (this->rotation) {
case display::DISPLAY_ROTATION_90_DEGREES:
for (lv_coord_t x = height - 1; x-- != 0;) {
for (lv_coord_t x = height; x-- != 0;) {
for (lv_coord_t y = 0; y != width; y++) {
dst[y * height + x] = *ptr++;
}