use gdispColor2Native to get fill color

ugfx_release_2.6
ergosys 2014-12-13 14:44:01 -08:00
parent 9618d7917b
commit d3b3020a07
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_CLEARS
LLDSPEC void gdisp_lld_clear(GDisplay *g) {
uint8_t fill = (g->p.color == Black) ? 0 : 0xff;
uint8_t fill = (gdispColor2Native(g->p.color) == Black) ? 0 : 0xff;
int bytes = GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT/8;
memset(RAM(g), fill, bytes);
g->flags |= GDISP_FLG_NEEDFLUSH;