diff options
Diffstat (limited to 'utils/nwztools/plattools/test_display.c')
-rw-r--r-- | utils/nwztools/plattools/test_display.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/utils/nwztools/plattools/test_display.c b/utils/nwztools/plattools/test_display.c index 0a8089eca9..b05b246b6f 100644 --- a/utils/nwztools/plattools/test_display.c +++ b/utils/nwztools/plattools/test_display.c | |||
@@ -24,8 +24,24 @@ | |||
24 | int NWZ_TOOL_MAIN(test_display)(int argc, char **argv) | 24 | int NWZ_TOOL_MAIN(test_display)(int argc, char **argv) |
25 | { | 25 | { |
26 | /* clear screen and display welcome message */ | 26 | /* clear screen and display welcome message */ |
27 | nwz_lcdmsg(true, 0, 0, "test_display"); | 27 | nwz_display_clear(NWZ_COLOR(128, 128, 0)); |
28 | nwz_lcdmsg(false, 0, 1, "BACK: quit"); | 28 | nwz_display_text(0, 0, true, NWZ_COLOR(255, 0, 0), NWZ_COLOR(0, 0, 255), 0, |
29 | "Hello"); | ||
30 | nwz_display_text(0, 30, false, NWZ_COLOR(255, 0, 0), NWZ_COLOR(0, 0, 255), 128, | ||
31 | "BACK: quit"); | ||
32 | nwz_display_text(0, 50, false, NWZ_COLOR(255, 0, 0), NWZ_COLOR(0, 0, 255), 255, | ||
33 | "BACK: quit"); | ||
34 | /* display /contents/display.bmp if any */ | ||
35 | const char *bmp_fname = "/contents/display.bmp"; | ||
36 | if(access(bmp_fname, R_OK) != -1) | ||
37 | { | ||
38 | nwz_display_bitmap(10, 70, bmp_fname, 0, 0, 200, 200, NWZ_COLOR_NO_KEY, 255); | ||
39 | } | ||
40 | else | ||
41 | { | ||
42 | nwz_display_text(0, 70, false, NWZ_COLOR(255, 0, 0), NWZ_COLOR(0, 0, 0), 0, | ||
43 | "Cannot find display.bmp"); | ||
44 | } | ||
29 | /* wait for key */ | 45 | /* wait for key */ |
30 | int input_fd = nwz_key_open(); | 46 | int input_fd = nwz_key_open(); |
31 | if(input_fd < 0) | 47 | if(input_fd < 0) |