summaryrefslogtreecommitdiff
path: root/bootloader/x1000/gui.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-20 13:13:54 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-25 21:36:51 +0000
commit6bc69c797c71200046fdb7bd3afd429d1db48d2f (patch)
tree8d155bfd4c10f8ec33a825a1a811bcb1fa3b32c1 /bootloader/x1000/gui.c
parent3d88f455cf8fa71bcd51bcd6c237c986443b4d97 (diff)
downloadrockbox-6bc69c797c71200046fdb7bd3afd429d1db48d2f.tar.gz
rockbox-6bc69c797c71200046fdb7bd3afd429d1db48d2f.zip
x1000: bootloader: accept button input during splash
This allows screenshots to be taken while a splash is displayed. Change-Id: Id494189283db1b6877416f5a1ef1a13c8b654507
Diffstat (limited to 'bootloader/x1000/gui.c')
-rw-r--r--bootloader/x1000/gui.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bootloader/x1000/gui.c b/bootloader/x1000/gui.c
index 1208d3c161..a15f315a44 100644
--- a/bootloader/x1000/gui.c
+++ b/bootloader/x1000/gui.c
@@ -116,7 +116,15 @@ void splashf(long delay, const char* msg, ...)
116 } while(str); 116 } while(str);
117 117
118 lcd_update(); 118 lcd_update();
119 sleep(delay); 119
120 if(delay == TIMEOUT_BLOCK) {
121 while(get_button(TIMEOUT_BLOCK) != BL_QUIT);
122 } else if(delay > 0) {
123 long end_tick = current_tick + delay;
124 do {
125 get_button(end_tick - current_tick);
126 } while(current_tick < end_tick);
127 }
120} 128}
121 129
122int get_button(int timeout) 130int get_button(int timeout)