aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-07-08 10:05:34 +1000
committerinmarket <andrewh@inmarket.com.au>2018-07-08 10:05:34 +1000
commite8b789bfb166ee3218e9dbb4c6ddf74bdba79510 (patch)
tree9932341d800d55da5d5ddcc056bdd0aebde4ed89 /src
parent63d69559929b04332b82b0f34a580097a985a884 (diff)
downloaduGFX-e8b789bfb166ee3218e9dbb4c6ddf74bdba79510.tar.gz
uGFX-e8b789bfb166ee3218e9dbb4c6ddf74bdba79510.tar.bz2
uGFX-e8b789bfb166ee3218e9dbb4c6ddf74bdba79510.zip
Fix some missing gBool conversions
Diffstat (limited to 'src')
-rw-r--r--src/gdisp/gdisp.c6
-rw-r--r--src/gdisp/mcufont/mf_config.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 38edda9c..e394568b 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -3340,21 +3340,21 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
/* Callback to render string boxes with word wrap. */
#if GDISP_NEED_TEXT_WORDWRAP
- static bool mf_countline_callback(mf_str line, uint16_t count, void *state) {
+ static gBool mf_countline_callback(mf_str line, uint16_t count, void *state) {
(void) line;
(void) count;
((coord_t*)state)[0]++;
return gTrue;
}
- static bool mf_drawline_callback(mf_str line, uint16_t count, void *state) {
+ static gBool mf_drawline_callback(mf_str line, uint16_t count, void *state) {
#define GD ((GDisplay *)state)
mf_render_aligned(GD->t.font, GD->t.wrapx, GD->t.wrapy, GD->t.lrj, line, count, drawcharglyph, state);
GD->t.wrapy += GD->t.font->line_height;
#undef GD
return gTrue;
}
- static bool mf_fillline_callback(mf_str line, uint16_t count, void *state) {
+ static gBool mf_fillline_callback(mf_str line, uint16_t count, void *state) {
#define GD ((GDisplay *)state)
mf_render_aligned(GD->t.font, GD->t.wrapx, GD->t.wrapy, GD->t.lrj, line, count, fillcharglyph, state);
GD->t.wrapy += GD->t.font->line_height;
diff --git a/src/gdisp/mcufont/mf_config.h b/src/gdisp/mcufont/mf_config.h
index 3b76ee44..9a951054 100644
--- a/src/gdisp/mcufont/mf_config.h
+++ b/src/gdisp/mcufont/mf_config.h
@@ -16,6 +16,10 @@
#include "../../../gfx.h"
+/* Ensure definitions are compatible with uGFX */
+#undef bool
+#define bool gBool
+
#if !GFX_USE_GDISP || !GDISP_NEED_TEXT
#define MF_NO_COMPILE // Don't compile any font code
#endif
@@ -59,7 +63,7 @@
/* Encoding for the input data.
* With the unicode encodings, the library supports the range of unicode
* characters 0x0000-0xFFFF (the Basic Multilingual Plane).
- *
+ *
* ASCII: Plain ascii (somewhat works with ISO8859-1 also)
* UTF8: UTF8 encoding (variable number of bytes)
* UTF16: UTF16 encoding (2 bytes per character, compatible with UCS-2)