summaryrefslogtreecommitdiffstats
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
parent3d88f455cf8fa71bcd51bcd6c237c986443b4d97 (diff)
downloadrockbox-6bc69c797c.tar.gz
rockbox-6bc69c797c.zip
x1000: bootloader: accept button input during splash
This allows screenshots to be taken while a splash is displayed. Change-Id: Id494189283db1b6877416f5a1ef1a13c8b654507
-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, ...)
} while(str);
lcd_update();
- sleep(delay);
+
+ if(delay == TIMEOUT_BLOCK) {
+ while(get_button(TIMEOUT_BLOCK) != BL_QUIT);
+ } else if(delay > 0) {
+ long end_tick = current_tick + delay;
+ do {
+ get_button(end_tick - current_tick);
+ } while(current_tick < end_tick);
+ }
}
int get_button(int timeout)