Small fix for scrolling
This commit is contained in:
parent
727aa67289
commit
f44b1c6412
1 changed files with 3 additions and 1 deletions
|
@ -2438,6 +2438,8 @@ void gdispGBlitArea(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, c
|
||||||
coord_t fy, dy, ix, fx, i, j;
|
coord_t fy, dy, ix, fx, i, j;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!lines) return;
|
||||||
|
|
||||||
MUTEX_ENTER(g);
|
MUTEX_ENTER(g);
|
||||||
#if NEED_CLIPPING
|
#if NEED_CLIPPING
|
||||||
#if GDISP_HARDWARE_CLIP == HARDWARE_AUTODETECT
|
#if GDISP_HARDWARE_CLIP == HARDWARE_AUTODETECT
|
||||||
|
@ -2446,7 +2448,7 @@ void gdispGBlitArea(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, c
|
||||||
{
|
{
|
||||||
if (x < g->clipx0) { cx -= g->clipx0 - x; x = g->clipx0; }
|
if (x < g->clipx0) { cx -= g->clipx0 - x; x = g->clipx0; }
|
||||||
if (y < g->clipy0) { cy -= g->clipy0 - y; y = g->clipy0; }
|
if (y < g->clipy0) { cy -= g->clipy0 - y; y = g->clipy0; }
|
||||||
if (!lines || cx <= 0 || cy <= 0 || x >= g->clipx1 || y >= g->clipy1) { MUTEX_EXIT(g); return; }
|
if (cx <= 0 || cy <= 0 || x >= g->clipx1 || y >= g->clipy1) { MUTEX_EXIT(g); return; }
|
||||||
if (x+cx > g->clipx1) cx = g->clipx1 - x;
|
if (x+cx > g->clipx1) cx = g->clipx1 - x;
|
||||||
if (y+cy > g->clipy1) cy = g->clipy1 - y;
|
if (y+cy > g->clipy1) cy = g->clipy1 - y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue