summaryrefslogtreecommitdiffstats
path: root/apps/recorder/icons.c
diff options
context:
space:
mode:
authorMarkus Braun <markus.braun@krawel.de>2002-08-30 19:44:58 +0000
committerMarkus Braun <markus.braun@krawel.de>2002-08-30 19:44:58 +0000
commit4e4dfc0848d8f4a31ee292332f72569148f67d90 (patch)
tree62b2a9e2a8a833a094dca4975317f491b2e85003 /apps/recorder/icons.c
parent5bade50b6af1494e8e045694f5f0d290582c1af7 (diff)
downloadrockbox-4e4dfc0848d8f4a31ee292332f72569148f67d90.tar.gz
rockbox-4e4dfc0848d8f4a31ee292332f72569148f67d90.tar.bz2
rockbox-4e4dfc0848d8f4a31ee292332f72569148f67d90.zip
Fixed time display in statusbar.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2087 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/icons.c')
-rw-r--r--apps/recorder/icons.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 3f6518903f..22233b6c84 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -290,7 +290,7 @@ void statusbar_icon_lock(void)
/*
* Print time to status bar
*/
-void statusbar_time(int minutes)
+void statusbar_time(int hour, int minute)
{
unsigned char buffer[6];
unsigned int width, height;
@@ -298,22 +298,13 @@ void statusbar_time(int minutes)
unsigned char *font;
#endif
- int hour = minutes / 60;
- int minute = minutes % 60;
-
if ( hour >= 0 &&
hour <= 23 &&
minute >= 0 &&
- minute <= 59 )
- {
- snprintf(buffer, sizeof(buffer), "%d%d:%d%d",
- (hour & 0x30) >> 4,
- hour & 0x0f,
- (minute & 0xf0) >> 4,
- minute & 0x0f);
+ minute <= 59 ) {
+ snprintf(buffer, sizeof(buffer), "%02d:%02d", hour, minute);
}
- else
- {
+ else {
strncpy(buffer, "--:--", sizeof buffer);
}