summaryrefslogtreecommitdiff
path: root/apps/examples/nx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/nx')
-rw-r--r--apps/examples/nx/nx_internal.h6
-rw-r--r--apps/examples/nx/nx_main.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/examples/nx/nx_internal.h b/apps/examples/nx/nx_internal.h
index b733a185f..a0fae77a9 100644
--- a/apps/examples/nx/nx_internal.h
+++ b/apps/examples/nx/nx_internal.h
@@ -45,8 +45,10 @@
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
+
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxtk.h>
+#include <nuttx/nx/nxfonts.h>
/****************************************************************************
* Definitions
@@ -106,6 +108,10 @@
# endif
#endif
+#ifndef CONFIG_EXAMPLES_NX_FONTID
+# define CONFIG_EXAMPLES_NX_FONTID NXFONT_DEFAULT
+#endif
+
#ifndef CONFIG_EXAMPLES_NX_FONTCOLOR
# if CONFIG_EXAMPLES_NX_BPP == 24 || CONFIG_EXAMPLES_NX_BPP == 32
# define CONFIG_EXAMPLES_NX_FONTCOLOR 0x00000000
diff --git a/apps/examples/nx/nx_main.c b/apps/examples/nx/nx_main.c
index d0beda92e..db17ea2f2 100644
--- a/apps/examples/nx/nx_main.c
+++ b/apps/examples/nx/nx_main.c
@@ -647,7 +647,7 @@ int MAIN_NAME(int argc, char *argv[])
/* Get the default font handle */
- g_fonthandle = nxf_getfonthandle(NXFONT_DEFAULT);
+ g_fonthandle = nxf_getfonthandle(CONFIG_EXAMPLES_NX_FONTID);
if (!g_fonthandle)
{
message(MAIN_NAME_STRING ": Failed to get font handle: %d\n", errno);