diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-27 14:43:45 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-27 14:43:45 +0000 |
commit | 99ffb319c5af373ef135c2a3e73bf1171e55559e (patch) | |
tree | 7aa08fa81a006d354469de2652043ab969d8a3c4 /apps/examples/nx | |
parent | ce09509ff8c3127b4cc07ebcaae78229d5b2d90a (diff) | |
download | nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.tar.gz nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.tar.bz2 nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.zip |
Incorporated new fonts into examples; fix glyph allocation bug in nxhello
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3822 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nx')
-rw-r--r-- | apps/examples/nx/nx_internal.h | 6 | ||||
-rw-r--r-- | apps/examples/nx/nx_main.c | 2 |
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); |