diff --git a/lv_draw/lv_draw_line.c b/lv_draw/lv_draw_line.c index e5255ba05..cb825d7a2 100644 --- a/lv_draw/lv_draw_line.c +++ b/lv_draw/lv_draw_line.c @@ -214,9 +214,6 @@ static void line_draw_skew(line_draw_t * main_line, const lv_area_t * mask, cons lv_coord_t width; width = style->line.width; -#if LV_ANTIALIAS - lv_coord_t width_safe; /*`width_safe` is always >=1*/ -#endif /* The pattern stores the points of the line ending. It has the good direction and length. * The worth case is the 45° line where pattern can have 1.41 x `width` points*/ @@ -245,8 +242,7 @@ static void line_draw_skew(line_draw_t * main_line, const lv_area_t * mask, cons width = i; #if LV_ANTIALIAS width--; - if(width == 0) width_safe = 1; - else width_safe = width; + #endif break; } @@ -259,6 +255,9 @@ static void line_draw_skew(line_draw_t * main_line, const lv_area_t * mask, cons } #if LV_ANTIALIAS + lv_coord_t width_safe = width; + if(width == 0) width_safe = 1; + lv_coord_t aa_last_corner; aa_last_corner = 0; #endif diff --git a/lv_misc/lv_log.h b/lv_misc/lv_log.h index 009479855..8874493ef 100644 --- a/lv_misc/lv_log.h +++ b/lv_misc/lv_log.h @@ -24,22 +24,21 @@ extern "C" { * DEFINES *********************/ +/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/ + +#define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/ +#define LV_LOG_LEVEL_INFO 1 /*Log important events*/ +#define LV_LOG_LEVEL_WARN 2 /*Log if something unwanted happened but didn't caused problem*/ +#define LV_LOG_LEVEL_ERROR 3 /*Only critical issue, when the system may fail*/ +#define _LV_LOG_LEVEL_NUM 4 + +typedef uint8_t lv_log_level_t; + +#if USE_LV_LOG /********************** * TYPEDEFS **********************/ -/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/ -enum -{ - LV_LOG_LEVEL_TRACE, /*A lot of logs to give detailed information*/ - LV_LOG_LEVEL_INFO, /*Log important events*/ - LV_LOG_LEVEL_WARN, /*Log if something unwanted happened but didn't caused problem*/ - LV_LOG_LEVEL_ERROR, /*Only critical issue, when the system may fail*/ - _LV_LOG_LEVEL_NUM -}; -typedef uint8_t lv_log_level_t; - -#if USE_LV_LOG /********************** * GLOBAL PROTOTYPES diff --git a/lv_misc/lv_mem.h b/lv_misc/lv_mem.h index ceb668a76..24d27eede 100644 --- a/lv_misc/lv_mem.h +++ b/lv_misc/lv_mem.h @@ -28,12 +28,12 @@ extern "C" { * DEFINES *********************/ // Check windows -#if __WIN64 +#ifdef __WIN64 # define LV_MEM_ENV64 #endif // Check GCC -#if __GNUC__ +#ifdef __GNUC__ # if __x86_64__ || __ppc64__ # define LV_MEM_ENV64 # endif diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index c64f3d37b..f4b3a9cd0 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -18,6 +18,7 @@ #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_ufs.h" #include "../lv_misc/lv_txt.h" +#include "../lv_misc/lv_log.h" /********************* * DEFINES