diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-04-07 23:18:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-04-07 23:18:32 +1000 |
commit | f44b1c6412571defb76a07c001529bab1cfedc0e (patch) | |
tree | 464f6a384679f091c4692e0f3d681c2085e90f56 /src/gdisp/gdisp.c | |
parent | 727aa67289372e1ca3a4c627a5fc6fd49d536a2c (diff) | |
download | uGFX-f44b1c6412571defb76a07c001529bab1cfedc0e.tar.gz uGFX-f44b1c6412571defb76a07c001529bab1cfedc0e.tar.bz2 uGFX-f44b1c6412571defb76a07c001529bab1cfedc0e.zip |
Small fix for scrolling
Diffstat (limited to 'src/gdisp/gdisp.c')
-rw-r--r-- | src/gdisp/gdisp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index f245633a..2491fd86 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -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; #endif + if (!lines) return; + MUTEX_ENTER(g); #if NEED_CLIPPING #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 (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 (y+cy > g->clipy1) cy = g->clipy1 - y; } |