Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

splash: splashf() should be voiced if given an IDPTR

Most calls to splashf() use str(IDNUM), those can be safely
moved to ID2P(IDNUM) now. Those will follow.

This change effectively makes splash() a simple wrapper around
splashf() so just make it into a #define instead..

Change-Id: I820e74e34cb4be3f523b25ce3f5dcc341bdba3e4

+10 -16
+7 -13
apps/gui/splash.c
··· 215 215 { 216 216 va_list ap; 217 217 218 + /* fmt may be a so called virtual pointer. See settings.h. */ 219 + long id; 220 + if((id = P2ID((const unsigned char*)fmt)) >= 0) 221 + /* If fmt specifies a voicefont ID, and voice menus are 222 + enabled, then speak it. */ 223 + cond_talk_ids_fq(id); 224 + 218 225 /* If fmt is a lang ID then get the corresponding string (which 219 226 still might contain % place holders). */ 220 227 fmt = P2STR((unsigned char *)fmt); ··· 234 241 } 235 242 if (ticks) 236 243 sleep(ticks); 237 - } 238 - 239 - void splash(int ticks, const char *str) 240 - { 241 - #if !defined(SIMULATOR) 242 - long id; 243 - /* fmt may be a so called virtual pointer. See settings.h. */ 244 - if((id = P2ID((const unsigned char*)str)) >= 0) 245 - /* If fmt specifies a voicefont ID, and voice menus are 246 - enabled, then speak it. */ 247 - cond_talk_ids_fq(id); 248 - #endif 249 - splashf(ticks, "%s", P2STR((const unsigned char*)str)); 250 244 } 251 245 252 246 /* set delay before progress meter is shown */
+1 -1
apps/gui/splash.h
··· 38 38 * - str : what to say, if this is a LANG_* string (from ID2P) 39 39 * it will be voiced 40 40 */ 41 - extern void splash(int ticks, const char *str); 41 + #define splash(__ticks, __str) splashf(__ticks, __str) 42 42 43 43 /* set a delay before displaying the progress meter the first time */ 44 44 extern void splash_progress_set_delay(long delay_ticks);
-1
apps/plugin.c
··· 184 184 language_strings, 185 185 &core_bitmaps[0], 186 186 /* lcd */ 187 - splash, 188 187 splashf, 189 188 splash_progress, 190 189 splash_progress_set_delay,
+2 -1
apps/plugin.h
··· 58 58 #undef vsprintf 59 59 #endif 60 60 61 + #define splash(__ticks, __str) splashf(__ticks, __str) 62 + 61 63 char* strncpy(char *, const char *, size_t); 62 64 void* plugin_get_buffer(size_t *buffer_size); 63 65 size_t plugin_reserve_buffer(size_t buffer_size); ··· 211 213 const struct cbmp_bitmap_info_entry *core_bitmaps; 212 214 213 215 /* lcd */ 214 - void (*splash)(int ticks, const char *str); 215 216 void (*splashf)(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); 216 217 void (*splash_progress)(int current, int total, const char *fmt, ...) ATTRIBUTE_PRINTF(3, 4); 217 218 void (*splash_progress_set_delay)(long delay_ticks);