forked from len0rd/rockbox
Revise r23225 a bit, removing the debug_printf function and implementing more generic lcd_(remote)_putsf function(s) instead and use those in more places
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5ca76ab9c4
commit
f34a841b0c
18 changed files with 366 additions and 413 deletions
|
|
@ -27,6 +27,9 @@
|
|||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "stdarg.h"
|
||||
#include "sprintf.h"
|
||||
|
||||
#ifndef LCDFN /* Not compiling for remote - define macros for main LCD. */
|
||||
#define LCDFN(fn) lcd_ ## fn
|
||||
#define FBFN(fn) fb_ ## fn
|
||||
|
|
@ -206,6 +209,17 @@ void LCDFN(puts)(int x, int y, const unsigned char *str)
|
|||
LCDFN(puts_style_offset)(x, y, str, STYLE_DEFAULT, 0);
|
||||
}
|
||||
|
||||
/* Formatting version of LCDFN(puts) */
|
||||
void LCDFN(putsf)(int x, int y, const unsigned char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buf[256];
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof (buf), fmt, ap);
|
||||
va_end(ap);
|
||||
LCDFN(puts)(x, y, buf);
|
||||
}
|
||||
|
||||
void LCDFN(puts_style)(int x, int y, const unsigned char *str, int style)
|
||||
{
|
||||
LCDFN(puts_style_offset)(x, y, str, style, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue