diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-11-06 00:12:04 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-11-06 00:12:04 +0100 |
commit | 5017babb307122d8567ca78a5721e96c4d7ff8f2 (patch) | |
tree | 26ca7ac1d8a3608e364d59a203c32b81b16f92e3 /utils/nwztools/plattools/test_display.c | |
parent | d492f25c54b4134fd6632156efee07670ab4004f (diff) | |
download | rockbox-5017babb307122d8567ca78a5721e96c4d7ff8f2.tar.gz rockbox-5017babb307122d8567ca78a5721e96c4d7ff8f2.zip |
nwztools/plattools: fix black screen issue in dualboot, rework dualboot
Sony added extensions to the frambuffer interface. It is important to take them
into account since the OF uses them and might leave the framebuffer in an
unusual state which would make the dualboot not display anything. Also rework
the dualboot code so that it can boot rockbox (not doing anything at the moment),
display all tools or boot the OF.
Change-Id: Ia0f589c9ec8558f375270841503c0964aff07f0b
Diffstat (limited to 'utils/nwztools/plattools/test_display.c')
-rw-r--r-- | utils/nwztools/plattools/test_display.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/utils/nwztools/plattools/test_display.c b/utils/nwztools/plattools/test_display.c index 1ebf40e813..0a8089eca9 100644 --- a/utils/nwztools/plattools/test_display.c +++ b/utils/nwztools/plattools/test_display.c | |||
@@ -25,7 +25,27 @@ 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_lcdmsg(true, 0, 0, "test_display"); |
28 | nwz_lcdmsg(false, 3, 10, "This program will stop in 5 seconds"); | 28 | nwz_lcdmsg(false, 0, 1, "BACK: quit"); |
29 | sleep(5); | 29 | /* wait for key */ |
30 | int input_fd = nwz_key_open(); | ||
31 | if(input_fd < 0) | ||
32 | { | ||
33 | sleep(2); | ||
34 | return 1; | ||
35 | } | ||
36 | while(1) | ||
37 | { | ||
38 | /* wait for event */ | ||
39 | int ret = nwz_key_wait_event(input_fd, 1000000); | ||
40 | if(ret != 1) | ||
41 | continue; | ||
42 | struct input_event evt; | ||
43 | if(nwz_key_read_event(input_fd, &evt) != 1) | ||
44 | continue; | ||
45 | /* handle quit */ | ||
46 | if(nwz_key_event_get_keycode(&evt) == NWZ_KEY_BACK && !nwz_key_event_is_press(&evt)) | ||
47 | break; | ||
48 | } | ||
49 | nwz_key_close(input_fd); | ||
30 | return 0; | 50 | return 0; |
31 | } | 51 | } |