x1000: bootloader: accept button input during splash

This allows screenshots to be taken while a splash is displayed.

Change-Id: Id494189283db1b6877416f5a1ef1a13c8b654507
This commit is contained in:
Aidan MacDonald 2022-03-20 13:13:54 +00:00
parent 3d88f455cf
commit 6bc69c797c

View file

@ -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)