summaryrefslogtreecommitdiffstats
path: root/apps/recorder/icons.c
diff options
context:
space:
mode:
authorMarkus Braun <markus.braun@krawel.de>2002-08-12 07:14:46 +0000
committerMarkus Braun <markus.braun@krawel.de>2002-08-12 07:14:46 +0000
commitf150d997baa8332e7dc4c9d3d61310309022a405 (patch)
treea99ae2487386389ba4fffcf48003bc7519eecb2f /apps/recorder/icons.c
parentb2a866434ed40f3713b4e8359f04989cbda429bc (diff)
downloadrockbox-f150d997baa8332e7dc4c9d3d61310309022a405.tar.gz
rockbox-f150d997baa8332e7dc4c9d3d61310309022a405.tar.bz2
rockbox-f150d997baa8332e7dc4c9d3d61310309022a405.zip
fixed display of 100% volume level
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1678 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/icons.c')
-rw-r--r--apps/recorder/icons.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 5bb6d75da8..c1177c9e3b 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -17,16 +17,12 @@
*
****************************************************************************/
#include <lcd.h>
+#include <string.h>
#include "kernel.h"
#include "sprintf.h"
+#include "rtc.h"
#include "icons.h"
-#ifndef SIMULATOR
-#include "sprintf.h"
-#endif
-#ifdef HAVE_RTC
-#include "rtc.h"
-#endif
#ifdef HAVE_LCD_BITMAP
@@ -229,7 +225,7 @@ void statusbar_icon_volume(int percent)
}
if(TIME_BEFORE(current_tick,switch_tick)) { /* display volume lever numerical */
snprintf(buffer, sizeof(buffer), "%2d", percent);
- lcd_putsxy(ICON_VOLUME_X_POS+ICON_VOLUME_WIDTH/2-6, STATUSBAR_Y_POS, buffer, 0);
+ lcd_putsxy(ICON_VOLUME_X_POS+ICON_VOLUME_WIDTH/2-6*strlen(buffer)/2, STATUSBAR_Y_POS, buffer, 0);
}
else { /* display volume bar */
volume=volume*14/100;