forked from len0rd/rockbox
voice: splash_progress
Says "Loading x%" in previously unvoiced splash_progress Change-Id: I81780e3baf6ea8a8871a4433e1a733100b8cd5f6
This commit is contained in:
parent
a001d76afe
commit
c51ca1eeb5
5 changed files with 22 additions and 14 deletions
|
|
@ -36,7 +36,7 @@
|
|||
#include "misc.h" /* get_current_activity */
|
||||
#endif
|
||||
|
||||
static long progress_next_tick = 0;
|
||||
static long progress_next_tick, talked_tick;
|
||||
|
||||
#define MAXLINES (LCD_HEIGHT/6)
|
||||
#define MAXBUFFER 512
|
||||
|
|
@ -247,6 +247,7 @@ void splashf(int ticks, const char *fmt, ...)
|
|||
void splash_progress_set_delay(long delay_ticks)
|
||||
{
|
||||
progress_next_tick = current_tick + delay_ticks;
|
||||
talked_tick = 0;
|
||||
}
|
||||
|
||||
/* splash a progress meter */
|
||||
|
|
@ -266,6 +267,15 @@ void splash_progress(int current, int total, const char *fmt, ...)
|
|||
vp_flag = 0; /* don't mark vp dirty to prevent flashing */
|
||||
}
|
||||
|
||||
if (global_settings.talk_menu &&
|
||||
total > 0 &&
|
||||
TIME_AFTER(current_tick, talked_tick + HZ*5))
|
||||
{
|
||||
talked_tick = current_tick;
|
||||
talk_ids(false, LANG_LOADING_PERCENT,
|
||||
TALK_ID(current * 100 / total, UNIT_PERCENT));
|
||||
}
|
||||
|
||||
/* If fmt is a lang ID then get the corresponding string (which
|
||||
still might contain % place holders). */
|
||||
fmt = P2STR((unsigned char *)fmt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue