diff --git a/apps/gui/splash.c b/apps/gui/splash.c index c970056375..7082f28b48 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c @@ -215,6 +215,13 @@ void splashf(int ticks, const char *fmt, ...) { va_list ap; + /* fmt may be a so called virtual pointer. See settings.h. */ + long id; + if((id = P2ID((const unsigned char*)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((unsigned char *)fmt); @@ -236,19 +243,6 @@ void splashf(int ticks, const char *fmt, ...) sleep(ticks); } -void splash(int ticks, const char *str) -{ -#if !defined(SIMULATOR) - long id; - /* fmt may be a so called virtual pointer. See settings.h. */ - if((id = P2ID((const unsigned char*)str)) >= 0) - /* If fmt specifies a voicefont ID, and voice menus are - enabled, then speak it. */ - cond_talk_ids_fq(id); -#endif - splashf(ticks, "%s", P2STR((const unsigned char*)str)); -} - /* set delay before progress meter is shown */ void splash_progress_set_delay(long delay_ticks) { diff --git a/apps/gui/splash.h b/apps/gui/splash.h index f7ff44e00b..a42ad29140 100644 --- a/apps/gui/splash.h +++ b/apps/gui/splash.h @@ -38,7 +38,7 @@ extern void splashf(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); * - str : what to say, if this is a LANG_* string (from ID2P) * it will be voiced */ -extern void splash(int ticks, const char *str); +#define splash(__ticks, __str) splashf(__ticks, __str) /* set a delay before displaying the progress meter the first time */ extern void splash_progress_set_delay(long delay_ticks); diff --git a/apps/plugin.c b/apps/plugin.c index 35e56c7fb5..87c4f1eab7 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -184,7 +184,6 @@ static const struct plugin_api rockbox_api = { language_strings, &core_bitmaps[0], /* lcd */ - splash, splashf, splash_progress, splash_progress_set_delay, diff --git a/apps/plugin.h b/apps/plugin.h index e8fe95b5a6..9739533a0a 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -58,6 +58,8 @@ #undef vsprintf #endif +#define splash(__ticks, __str) splashf(__ticks, __str) + char* strncpy(char *, const char *, size_t); void* plugin_get_buffer(size_t *buffer_size); size_t plugin_reserve_buffer(size_t buffer_size); @@ -211,7 +213,6 @@ struct plugin_api { const struct cbmp_bitmap_info_entry *core_bitmaps; /* lcd */ - void (*splash)(int ticks, const char *str); void (*splashf)(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); void (*splash_progress)(int current, int total, const char *fmt, ...) ATTRIBUTE_PRINTF(3, 4); void (*splash_progress_set_delay)(long delay_ticks);