From 5b76936a44de3c7ecd568300f26b5e6421901285 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Mon, 6 Aug 2007 13:08:36 +0000 Subject: 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 --- apps/gui/splash.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/gui/splash.c') 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); -- cgit v1.2.3