Browse Source

Win32 driver: Fix buffer position calculation in gdisp_lld_blit_area()

Thanks to @nathanwiebe for reporting this.
master
Joel Bodenmann 2 months ago
parent
commit
1235a9056c
  1. 1
      changelog.txt
  2. 2
      drivers/multiple/Win32/gdisp_lld_Win32.c

1
changelog.txt

@ -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 ***

2
drivers/multiple/Win32/gdisp_lld_Win32.c

@ -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);

Loading…
Cancel
Save