fix lcd mono

This commit is contained in:
lixianjing 2021-08-17 17:52:25 +08:00
parent 7cb021cb62
commit e3e8461a3a
3 changed files with 7 additions and 3 deletions

View File

@ -124,7 +124,7 @@ if LCD == 'SDL_GPU':
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_STB_FONT '
elif LCD == 'SDL_FB_MONO':
NANOVG_BACKEND='AGGE'
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DWITH_LCD_MONO -DWITH_NANOVG_SOFT '
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DWITH_LCD_MONO '
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_STB_FONT '
else:
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_STB_FONT '

View File

@ -361,7 +361,7 @@ typedef struct _system_info_t system_info_t;
#endif /*WITH_STB_FONT or WITH_FT_FONT*/
#if defined(WITH_LCD_MONO)
#undef WITH_VGCANVAS
#define WITHOUT_WINDOW_ANIMATORS 1
#define WITH_BITMAP_FONT 1
#endif /*WITH_LCD_MONO*/

View File

@ -52,7 +52,11 @@ static color_t lcd_mono_get_point_color(lcd_t* lcd, xy_t x, xy_t y) {
static ret_t lcd_mono_begin_frame(lcd_t* lcd, const dirty_rects_t* dirty_rects) {
const rect_t* dirty_rect = dirty_rects != NULL ? &(dirty_rects->max) : NULL;
lcd->dirty_rect = *dirty_rect;
if (dirty_rect != NULL) {
lcd->dirty_rect = *dirty_rect;
} else {
lcd->dirty_rect = rect_init(0, 0, lcd->w, lcd->h);
}
return RET_OK;
}