diff options
| -rw-r--r-- | drivers/gdisp/SSD1289/gdisp_lld_config.h | 2 | ||||
| -rw-r--r-- | src/gdisp/gdisp.c | 8 | 
2 files changed, 6 insertions, 4 deletions
| diff --git a/drivers/gdisp/SSD1289/gdisp_lld_config.h b/drivers/gdisp/SSD1289/gdisp_lld_config.h index f8743a2b..84e518d2 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld_config.h +++ b/drivers/gdisp/SSD1289/gdisp_lld_config.h @@ -24,7 +24,7 @@  #define GDISP_HARDWARE_STREAM_WRITE		TRUE  #define GDISP_HARDWARE_STREAM_READ		TRUE -//#define GDISP_HARDWARE_STREAM_POS		TRUE +#define GDISP_HARDWARE_STREAM_POS		TRUE  #define GDISP_HARDWARE_CONTROL			TRUE  #if defined(GDISP_USE_DMA)
 diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 53882492..3d2e6e36 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -87,6 +87,7 @@ GDisplay	*GDISP = GDisplayArray;  	static INLINE void setglobalwindow(GDisplay *g) {  		coord_t	x, y;  		x = g->p.x; y = g->p.y; +		g->p.x = g->p.y = 0;  		g->p.cx = g->g.Width; g->p.cy = g->g.Height;  		gdisp_lld_write_start(g);  		g->p.x = x; g->p.y = y; @@ -304,8 +305,9 @@ static void hline_clip(GDisplay *g) {  		{  			if (!(g->flags & GDISP_FLG_SCRSTREAM))  				setglobalwindow(g); +			g->p.cx = g->p.x1 - g->p.x + 1;  			gdisp_lld_write_pos(g); -			do { gdisp_lld_write_color(g); } while(g->p.cx--); +			do { gdisp_lld_write_color(g); } while(--g->p.cx);  			return;  		}  	#endif @@ -319,7 +321,7 @@ static void hline_clip(GDisplay *g) {  			g->p.cx = g->p.x1 - g->p.x + 1;  			g->p.cy = 1;  			gdisp_lld_write_start(g); -			do { gdisp_lld_write_color(g); } while(g->p.cx--); +			do { gdisp_lld_write_color(g); } while(--g->p.cx);  			gdisp_lld_write_stop(g);  			return;  		} @@ -404,7 +406,7 @@ static void vline_clip(GDisplay *g) {  				#endif  				gdisp_lld_write_pos(g);  			#endif -			do { gdisp_lld_write_color(g); } while(g->p.cy--); +			do { gdisp_lld_write_color(g); } while(--g->p.cy);  			gdisp_lld_write_stop(g);  			return;  		} | 
