summaryrefslogtreecommitdiff
path: root/apps/screens.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/screens.c')
-rw-r--r--apps/screens.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/apps/screens.c b/apps/screens.c
index 1b269d93bc..c2ffb44f3c 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -673,8 +673,7 @@ bool f3_screen(void)
673#define MAXLINES 2 673#define MAXLINES 2
674#endif 674#endif
675 675
676void splash(int ticks, /* how long */ 676void splash(int ticks, /* how long the splash is displayed */
677 int keymask, /* what keymask aborts the waiting (if any) */
678 bool center, /* FALSE means left-justified, TRUE means 677 bool center, /* FALSE means left-justified, TRUE means
679 horizontal and vertical center */ 678 horizontal and vertical center */
680 char *fmt, /* what to say *printf style */ 679 char *fmt, /* what to say *printf style */
@@ -813,24 +812,13 @@ void splash(int ticks, /* how long */
813 } 812 }
814 lcd_update(); 813 lcd_update();
815 814
816 if(ticks) { 815 if(ticks)
817 if(keymask) { 816 /* unbreakable! */
818 int start = current_tick; 817 sleep(ticks);
819 int done = ticks + current_tick + 1;
820 while (TIME_BEFORE( current_tick, done)) {
821 int button = button_get_w_tmo(ticks - (current_tick-start));
822 if((button & keymask) == keymask)
823 break;
824 }
825 }
826 else
827 /* unbreakable! */
828 sleep(ticks);
829 }
830} 818}
831 819
832void charging_splash(void) 820void charging_splash(void)
833{ 821{
834 splash(2*HZ, 0, true, str(LANG_BATTERY_CHARGE)); 822 splash(2*HZ, true, str(LANG_BATTERY_CHARGE));
835 while (button_get(false)); 823 while (button_get(false));
836} 824}