summaryrefslogtreecommitdiffstats
path: root/apps/plugins/blackjack.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-28 21:46:45 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-28 21:46:45 +0000
commitab9fd1840b8025336081bd72fb9dbaea7b9909dd (patch)
tree4c410bffcf1a9de2ce55a59bef45e3ecfa183a62 /apps/plugins/blackjack.c
parent8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff)
downloadrockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.gz
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.bz2
rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.zip
plugins: use lcd_putsf/lcd_putsxyf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27926 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/blackjack.c')
-rw-r--r--apps/plugins/blackjack.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index 8b28b815b8..42f73ff47c 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -946,7 +946,6 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit,
signed int upper_limit,
signed int start) {
int button;
- char str[9];
bool breakout = false, changed = false;
unsigned int w, h;
signed int amount;
@@ -968,8 +967,7 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit,
#if LCD_HEIGHT <= 64
rb->lcd_clear_display();
rb->lcd_puts(0, 1, message);
- rb->snprintf(str, 9, "$%d", amount);
- rb->lcd_puts(0, 2, str);
+ rb->lcd_putsf(0, 2, "$%d", amount);
rb->lcd_puts(0, 3, "RIGHT: +1");
rb->lcd_puts(0, 4, "LEFT: -1");
rb->lcd_puts(0, 5, "UP: +10");
@@ -983,8 +981,7 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit,
rb->lcd_drawrect(LCD_WIDTH/2 - 9*w - 1, LCD_HEIGHT/2 - 4*h - 3,
37*w / 2, 8*h -3);
rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 4*h - 1, message);
- rb->snprintf(str, 9, "$%d", amount);
- rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, str);
+ rb->lcd_putsxyf(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, "$%d", amount);
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || \
(CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD) || \
@@ -1063,15 +1060,14 @@ static signed int blackjack_get_amount(char message[20], signed int lower_limit,
}
if(changed) {
- rb->snprintf(str, 9, "$%d", amount);
#if LCD_HEIGHT <= 64
- rb->lcd_puts(0, 2, str);
+ rb->lcd_putsf(0, 2, "$%d", amount);
rb->lcd_update();
#else
rb->lcd_set_drawmode(DRMODE_BG+DRMODE_INVERSEVID);
rb->lcd_fillrect(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, 5*w, h);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_putsxy(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, str);
+ rb->lcd_putsxyf(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, "$%d", amount);
rb->lcd_update_rect(LCD_WIDTH/2 - 9*w, LCD_HEIGHT/2 - 3*h, 5*w, h);
#endif
changed = false;