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 @@ #include "stdio.h" #include "kernel.h" #include "screen_access.h" +#include "lang.h" +#include "settings.h" +#include "talk.h" #ifndef MAX #define MAX(a, b) (((a)>(b))?(a):(b)) @@ -197,6 +200,15 @@ void gui_syncsplash(int ticks, const unsigned char *fmt, ...) { va_list ap; int i; + long id; + /* fmt may be a so called virtual pointer. See settings.h. */ + if((id = P2ID(fmt)) >= 0) + /* If fmt specifies a voicefont ID, and voice menus are + enabled, then speak it. */ + cond_talk_ids_fq(id); + /* If fmt is a lang ID then get the corresponding string (which + still might contain % place holders). */ + fmt = P2STR(fmt); va_start( ap, fmt ); FOR_NB_SCREENS(i) splash(&(screens[i]), fmt, ap); |