diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-10-12 18:11:37 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-10-12 18:11:37 +0000 |
commit | efdbcc114caa0e25b4900f8b2f6f444632a618e0 (patch) | |
tree | d64dab24951ce20e9909a0d9d674c86cab583b10 /apps | |
parent | 301f84547335b855348eb33a1fbbf75f0d33360d (diff) |
Fix typo from r19579 that prevented this code from building, avoid copying lang strings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23134 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/screens.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/screens.c b/apps/screens.c index 42ea9f29c9..3e7018686f 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -295,36 +295,35 @@ static void charging_display_info(bool animate) const int pox_y = 32; static unsigned phase = 3; unsigned i; - char buf[32]; - (void)buf; + const char *s; #ifdef NEED_ATA_POWER_BATT_MEASURE if (ide_powered()) /* FM and V2 can only measure when ATA power is on */ #endif { + char buf[32]; int battv = battery_voltage(); snprintf(buf, 32, " Batt: %d.%02dV %d%% ", battv / 1000, (battv % 1000) / 10, battery_level()); lcd_puts(0, 7, buf); } -#ifdef ARCHOS_RECORER - snprintf(buf, 32, "Charge mode:"); - lcd_puts(0, 2, buf); +#ifdef ARCHOS_RECORDER + lcd_puts(0, 2, "Charge mode:"); if (charge_state == CHARGING) - snprintf(buf, 32, str(LANG_BATTERY_CHARGE)); + s = str(LANG_BATTERY_CHARGE); else if (charge_state == TOPOFF) - snprintf(buf, 32, str(LANG_BATTERY_TOPOFF_CHARGE)); + s = str(LANG_BATTERY_TOPOFF_CHARGE); else if (charge_state == TRICKLE) - snprintf(buf, 32, str(LANG_BATTERY_TRICKLE_CHARGE)); + s = str(LANG_BATTERY_TRICKLE_CHARGE); else - snprintf(buf, 32, "not charging"); + s = "not charging"; - lcd_puts(0, 3, buf); + lcd_puts(0, 3, s); if (!charger_enabled()) animate = false; -#endif /* ARCHOS_RECORER */ +#endif /* ARCHOS_RECORDER */ /* middle part */ memset(charging_logo+3, 0x00, 32); |