forked from len0rd/rockbox
FS#9281 Rename of splash functions.
* Remove gui_splash() * Rename gui_syncsplash() to splashf() and remove its voice capabilities. * Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple splashing without printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); if a LANG_* id is passed it will be voiced. * Adjust all places that called gui_syncsplash() to use the correct variant from above. * Export both new functions to plugins and adjust places calling rb->splash() to use the correct variant so that we now have naming consistency between the core and plugins. * Fix one latent bug that would cause my sim to crash with the above changes and correct P2STR and P2ID macros, thanks to pondlife. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9464fdde2d
commit
01729e7a18
65 changed files with 276 additions and 305 deletions
|
@ -57,7 +57,7 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete
|
|||
fd = rb->open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
rb->splash(2*HZ, "Can't open %s", filename);
|
||||
rb->splashf(2*HZ, "Can't open %s", filename);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
readsize = rb->read(fd, &header, sizeof(header));
|
||||
|
@ -67,17 +67,17 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete
|
|||
|
||||
if (readsize != sizeof(header))
|
||||
{
|
||||
rb->splash(2*HZ, "Reading %s overlay failed.", name);
|
||||
rb->splashf(2*HZ, "Reading %s overlay failed.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
if (header.magic != PLUGIN_MAGIC || header.target_id != TARGET_ID)
|
||||
{
|
||||
rb->splash(2*HZ, "%s overlay: Incompatible model.", name);
|
||||
rb->splashf(2*HZ, "%s overlay: Incompatible model.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
if (header.api_version != PLUGIN_API_VERSION)
|
||||
{
|
||||
rb->splash(2*HZ, "%s overlay: Incompatible version.", name);
|
||||
rb->splashf(2*HZ, "%s overlay: Incompatible version.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
|
||||
|
@ -85,14 +85,14 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete
|
|||
if (header.load_addr < audiobuf ||
|
||||
header.end_addr > audiobuf + audiobuf_size)
|
||||
{
|
||||
rb->splash(2*HZ, "%s overlay doesn't fit into memory.", name);
|
||||
rb->splashf(2*HZ, "%s overlay doesn't fit into memory.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
|
||||
fd = rb->open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
rb->splash(2*HZ, "Can't open %s", filename);
|
||||
rb->splashf(2*HZ, "Can't open %s", filename);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
readsize = rb->read(fd, header.load_addr, header.end_addr - header.load_addr);
|
||||
|
@ -100,7 +100,7 @@ enum plugin_status run_overlay(const struct plugin_api* rb, const void* paramete
|
|||
|
||||
if (readsize < 0)
|
||||
{
|
||||
rb->splash(2*HZ, "Reading %s overlay failed.", name);
|
||||
rb->splashf(2*HZ, "Reading %s overlay failed.", name);
|
||||
return PLUGIN_ERROR;
|
||||
}
|
||||
/* Zero out bss area */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue