From 91b9bea35b40ff5f8f5de5448fe70a178cc77df0 Mon Sep 17 00:00:00 2001 From: Kiss-Vamosi Gabor Date: Sat, 17 Jun 2017 09:08:12 +0200 Subject: [PATCH] Error check for too small VDB --- lv_obj/lv_obj.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lv_obj/lv_obj.h b/lv_obj/lv_obj.h index 987bcc833..4b6c7f02a 100644 --- a/lv_obj/lv_obj.h +++ b/lv_obj/lv_obj.h @@ -35,6 +35,14 @@ #error "LV: If LV_VDB_SIZE == 0 the antialaissing must be disabled" #endif +#if LV_VDB_SIZE != 0 && LV_VDB_SIZE < LV_HOR_RES && LV_ANTIALIAS == 0 +#error "LV: Small Virtual Display Buffer (lv_conf.h: LV_VDB_SIZE >= LV_HOR_RES)" +#endif + +#if LV_VDB_SIZE != 0 && LV_VDB_SIZE < 2 *LV_HOR_RES && LV_ANTIALIAS != 0 +#error "LV: Small Virtual Display Buffer (lv_conf.h: LV_VDB_SIZE >= (2 * LV_HOR_RES))" +#endif + /*New defines*/ #define LV_OBJ_DEF_WIDTH (80 * LV_DOWNSCALE) #define LV_OBJ_DEF_HEIGHT (60 * LV_DOWNSCALE)