diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-08-06 13:08:36 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-08-06 13:08:36 +0000 |
commit | 5b76936a44de3c7ecd568300f26b5e6421901285 (patch) | |
tree | 504d9cf371d8f64c70a7bb40469a3a6f05a1b7cd /apps/gui/splash.c | |
parent | d755c283caef258ae5d81278d324f907fcf402c8 (diff) | |
download | rockbox-5b76936a44de3c7ecd568300f26b5e6421901285.tar.gz rockbox-5b76936a44de3c7ecd568300f26b5e6421901285.zip |
Accept FS#6159 'Add voice to roughly 100 splash screens and yes-no menus' by Stephane Doyon with some minor tweaks by me. Rerun 'configure' and do a 'make clean' before rebuilding your voice files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14213 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/splash.c')
-rw-r--r-- | apps/gui/splash.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 72279a371d..94d9ef6a5c 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -22,6 +22,9 @@ | |||
22 | #include "stdio.h" | 22 | #include "stdio.h" |
23 | #include "kernel.h" | 23 | #include "kernel.h" |
24 | #include "screen_access.h" | 24 | #include "screen_access.h" |
25 | #include "lang.h" | ||
26 | #include "settings.h" | ||
27 | #include "talk.h" | ||
25 | 28 | ||
26 | #ifndef MAX | 29 | #ifndef MAX |
27 | #define MAX(a, b) (((a)>(b))?(a):(b)) | 30 | #define MAX(a, b) (((a)>(b))?(a):(b)) |
@@ -197,6 +200,15 @@ void gui_syncsplash(int ticks, const unsigned char *fmt, ...) | |||
197 | { | 200 | { |
198 | va_list ap; | 201 | va_list ap; |
199 | int i; | 202 | int i; |
203 | long id; | ||
204 | /* fmt may be a so called virtual pointer. See settings.h. */ | ||
205 | if((id = P2ID(fmt)) >= 0) | ||
206 | /* If fmt specifies a voicefont ID, and voice menus are | ||
207 | enabled, then speak it. */ | ||
208 | cond_talk_ids_fq(id); | ||
209 | /* If fmt is a lang ID then get the corresponding string (which | ||
210 | still might contain % place holders). */ | ||
211 | fmt = P2STR(fmt); | ||
200 | va_start( ap, fmt ); | 212 | va_start( ap, fmt ); |
201 | FOR_NB_SCREENS(i) | 213 | FOR_NB_SCREENS(i) |
202 | splash(&(screens[i]), fmt, ap); | 214 | splash(&(screens[i]), fmt, ap); |