From 2116bba296f12bd94024ec7c39ae03fbfcc5bdef Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 31 Jan 2005 00:39:20 +0000 Subject: New function for formatting large-range values for output, both printed and voiced. This replaces num2max5(). It is currently used for the total/free space display in the info menu, for the recorded number of bytes (recorders) and the MMC debug info (Ondios). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5721 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/recording.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'apps/recorder') diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 0ffa16f31b..35da6f7127 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -248,6 +248,13 @@ bool recording_screen(void) bool led_state; int led_delay; + const unsigned char *byte_units[] = { + ID2P(LANG_BYTE), + ID2P(LANG_KILOBYTE), + ID2P(LANG_MEGABYTE), + ID2P(LANG_GIGABYTE) + }; + cursor = 0; mpeg_init_recording(); @@ -587,10 +594,13 @@ bool recording_screen(void) dhours, dminutes); } else + { + output_dyn_value(buf2, sizeof buf2, + mpeg_num_recorded_bytes(), + byte_units, true); snprintf(buf, 32, "%s %s", - str(LANG_RECORDING_SIZE), - num2max5(mpeg_num_recorded_bytes(), - buf2)); + str(LANG_RECORDING_SIZE), buf2); + } } lcd_puts(0, 1, buf); -- cgit v1.2.3