Bangle.js2: Fix 'stuck' bottom row of pixels if scrolling downwards with g.scroll(0,1)

This commit is contained in:
Gordon Williams 2021-10-26 09:21:06 +01:00
parent aac0055755
commit c118a9f89e
2 changed files with 2 additions and 1 deletions

View File

@ -62,6 +62,7 @@
Bangle.js: A single widget load failure will now not remove all widgets
Bangle.js: widgets are now sorted by .sortorder
While and for loop conditions now use Expression, not AssignmentExpression (eg. while(0,0) is fine) (fix #2068)
Bangle.js2: Fix 'stuck' bottom row of pixels if scrolling downwards with g.scroll(0,1)
2v10 : Bangle.js: Improved HRM calculations - swapped autocorrelation for bandpass filter
Bangle.js: Significantly improved step counting algorithm using bandpass filter (fix #1846)

View File

@ -151,7 +151,7 @@ void lcdMemLCD_scroll(struct JsGraphics *gfx, int xdir, int ydir, int x1, int y1
memcpy(&lcdBuffer[y*LCD_STRIDE + LCD_ROWHEADER],&lineBuffer[LCD_ROWHEADER],LCD_STRIDE-LCD_ROWHEADER);
}
} else if (ydir>0) {
for (int y=y2-ydir-1;y>=y1;y--) {
for (int y=y2-ydir;y>=y1;y--) {
int yx = y+ydir;
lcdMemLCD_scrollX(gfx, lineBuffer, &lcdBuffer[y*LCD_STRIDE], xdir);
memcpy(&lcdBuffer[yx*LCD_STRIDE + LCD_ROWHEADER],&lineBuffer[LCD_ROWHEADER],LCD_STRIDE-LCD_ROWHEADER);