diff options
-rw-r--r-- | apps/plugin.c | 1 | ||||
-rw-r--r-- | apps/plugin.h | 1 | ||||
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 11 | ||||
-rw-r--r-- | firmware/export/lcd-remote.h | 1 | ||||
-rw-r--r-- | firmware/export/lcd.h | 1 |
5 files changed, 15 insertions, 0 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 5101ceeb20..767c593f57 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -723,6 +723,7 @@ static const struct plugin_api rockbox_api = { | |||
723 | the API gets incompatible */ | 723 | the API gets incompatible */ |
724 | 724 | ||
725 | lcd_putsf, | 725 | lcd_putsf, |
726 | lcd_putsxyf, | ||
726 | }; | 727 | }; |
727 | 728 | ||
728 | int plugin_load(const char* plugin, const void* parameter) | 729 | int plugin_load(const char* plugin, const void* parameter) |
diff --git a/apps/plugin.h b/apps/plugin.h index 2bcd93e3ad..2f187f120b 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -896,6 +896,7 @@ struct plugin_api { | |||
896 | the API gets incompatible */ | 896 | the API gets incompatible */ |
897 | 897 | ||
898 | void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...); | 898 | void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...); |
899 | void (*lcd_putsxyf)(int x, int y, const unsigned char *fmt, ...); | ||
899 | }; | 900 | }; |
900 | 901 | ||
901 | /* plugin header */ | 902 | /* plugin header */ |
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index fba09cf06b..9f1d5fef68 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c | |||
@@ -219,6 +219,17 @@ void LCDFN(putsxy)(int x, int y, const unsigned char *str) | |||
219 | LCDFN(putsxyofs)(x, y, 0, str); | 219 | LCDFN(putsxyofs)(x, y, 0, str); |
220 | } | 220 | } |
221 | 221 | ||
222 | /* Formatting version of LCDFN(putsxy) */ | ||
223 | void LCDFN(putsxyf)(int x, int y, const unsigned char *fmt, ...) | ||
224 | { | ||
225 | va_list ap; | ||
226 | char buf[256]; | ||
227 | va_start(ap, fmt); | ||
228 | vsnprintf(buf, sizeof (buf), fmt, ap); | ||
229 | va_end(ap); | ||
230 | LCDFN(putsxy)(x, y, buf); | ||
231 | } | ||
232 | |||
222 | static void LCDFN(putsxyofs_style)(int xpos, int ypos, | 233 | static void LCDFN(putsxyofs_style)(int xpos, int ypos, |
223 | const unsigned char *str, int style, | 234 | const unsigned char *str, int style, |
224 | int w, int h, int offset) | 235 | int w, int h, int offset) |
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h index 62e82ca6ac..5b96863536 100644 --- a/firmware/export/lcd-remote.h +++ b/firmware/export/lcd-remote.h | |||
@@ -178,6 +178,7 @@ extern void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x, | |||
178 | extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, | 178 | extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, |
179 | int width, int height); | 179 | int width, int height); |
180 | extern void lcd_remote_putsxy(int x, int y, const unsigned char *str); | 180 | extern void lcd_remote_putsxy(int x, int y, const unsigned char *str); |
181 | extern void lcd_remote_putsxyf(int x, int y, const unsigned char *fmt, ...); | ||
181 | 182 | ||
182 | extern void lcd_remote_bidir_scroll(int threshold); | 183 | extern void lcd_remote_bidir_scroll(int threshold); |
183 | extern void lcd_remote_scroll_step(int pixels); | 184 | extern void lcd_remote_scroll_step(int pixels); |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 35720900fe..1cbb286ad1 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -191,6 +191,7 @@ extern void lcd_update_viewport(void); | |||
191 | extern void lcd_clear_viewport(void); | 191 | extern void lcd_clear_viewport(void); |
192 | extern void lcd_clear_display(void); | 192 | extern void lcd_clear_display(void); |
193 | extern void lcd_putsxy(int x, int y, const unsigned char *string); | 193 | extern void lcd_putsxy(int x, int y, const unsigned char *string); |
194 | extern void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...); | ||
194 | extern void lcd_puts(int x, int y, const unsigned char *string); | 195 | extern void lcd_puts(int x, int y, const unsigned char *string); |
195 | extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...); | 196 | extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...); |
196 | extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); | 197 | extern void lcd_puts_style(int x, int y, const unsigned char *string, int style); |