File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ext_mod/lcd_bus/esp32_src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 344344 y_end = MIN (y_end , v_res );
345345 }
346346
347- uint16_t copy_bytes_per_line = (x_end - x_start + 1 ) * (uint16_t )bytes_per_pixel ;
347+ uint16_t copy_bytes_per_line = (x_end - x_start ) * (uint16_t )bytes_per_pixel ;
348348 int pixels_per_line = h_res ;
349349 uint32_t bytes_per_line = bytes_per_pixel * pixels_per_line ;
350350 size_t offset = y_start * copy_bytes_per_line + x_start * bytes_per_pixel ;
357357 uint8_t * fb = to + ((y_start * h_res + x_start ) * bytes_per_pixel );
358358
359359 if (x_start == 0 && x_end == (h_res - 1 )) {
360- memcpy (fb , from , bytes_per_line * (y_end - y_start + 1 ));
360+ memcpy (fb , from , h_res * (y_end - y_start + 1 ) * bytes_per_pixel );
361361 } else {
362362 for (int y = y_start ; y < y_end ; y ++ ) {
363363 memcpy (fb , from , copy_bytes_per_line );
400400 for (int y = y_start ; y < y_end ; y ++ ) {
401401 for (int x = x_start ; x < x_end ; x ++ ) {
402402 jj = y * copy_bytes_per_line + x * bytes_per_pixel - offset ;
403- ii = (( v_res - 1 - x ) * h_res + y ) * bytes_per_pixel ;
403+ ii = (x * h_res + h_res - 1 - y ) * bytes_per_pixel ;
404404 func (to + ii , from + jj );
405405 }
406406 }
You can’t perform that action at this time.
0 commit comments