Win32 driver: Fix buffer position calculation in gdisp_lld_blit_area()

Thanks to @nathanwiebe for reporting this.
This commit is contained in:
Joel Bodenmann 2021-08-26 00:04:47 +02:00
parent 3f1f1c6a95
commit 1235a9056c
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ CHANGE: STM32LTDC driver: Rename GDISP_LTDC_USE_RGB565 to STM32LTDC_USE_RGB5
FEATURE: STM32LTDC driver: Support double buffering. This introduces STM32LTDC_USE_DOUBLEBUFFERING.
FIX: STM32LTDC driver: Fix bug in gdisp_lld_blit_area() which affected blits with source coordinates other than (0, 0).
FIX: Improve /demos/benchmarks/rectangles.
FIX: Win32 driver: Fix buffer position calculation in gdisp_lld_blit_area().
*** Release 2.9 ***

View File

@ -1283,7 +1283,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
// Make everything relative to the start of the line
priv = g->priv;
buffer = g->p.ptr;
buffer += g->p.x2*g->p.y1;
buffer += g->p.x2 * g->p.y1 + g->p.x1;
memset(&bmpInfo, 0, sizeof(bmpInfo));
bmpInfo.bV4Size = sizeof(bmpInfo);