summaryrefslogtreecommitdiff
path: root/apps/gui/statusbar.c
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-09-26 11:56:59 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-09-26 11:56:59 +0000
commit183499a2d43ebcec9a522bbcbde506f0b3c5e01d (patch)
treeb6c7a976c5785a6df79b3e9fc8293dda0ae87c10 /apps/gui/statusbar.c
parent36e3081e8ca979a941434175e05c1f5db164b111 (diff)
Recording screen statusbar: Improved channel icon by Paul Louden and improved Q value display for Hardware codec targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11062 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/statusbar.c')
-rw-r--r--apps/gui/statusbar.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index b5913af9be..a8b8c5061b 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -77,7 +77,7 @@
STATUSBAR_PLUG_WIDTH + \
STATUSBAR_VOLUME_WIDTH + \
STATUSBAR_PLAY_STATE_WIDTH + \
- 4*ICONS_SPACING - 1
+ 3*ICONS_SPACING
#define STATUSBAR_RECFREQ_WIDTH 12
#define STATUSBAR_RECCHANNELS_X_POS STATUSBAR_X_POS + \
STATUSBAR_BATTERY_WIDTH + \
@@ -603,7 +603,7 @@ void gui_statusbar_time(struct screen * display, int hour, int minute)
void gui_statusbar_icon_recording_info(struct screen * display)
{
#if (CONFIG_CODEC != SWCODEC) || (defined(SIMULATOR) && defined(HAVE_SPDIF_IN))
- char buffer[4];
+ char buffer[3];
#endif
#if CONFIG_CODEC != SWCODEC
int width, height;
@@ -622,18 +622,6 @@ void gui_statusbar_icon_recording_info(struct screen * display)
"88",
"96"
};
- static char* const bit_rate[9] =
- {
- "Mq0",
- "Mq1",
- "Mq2",
- "Mq3",
- "Mq4",
- "Mq5",
- "Mq6",
- "Mq7",
- "WAV"
- };
display->setfont(FONT_SYSFIXED);
#endif
@@ -646,13 +634,15 @@ void gui_statusbar_icon_recording_info(struct screen * display)
STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS,
STATUSBAR_ENCODER_WIDTH, STATUSBAR_HEIGHT);
#else
- snprintf(buffer, sizeof(buffer), "%s",
- bit_rate[global_settings.rec_quality]);
+
+ display->mono_bitmap(bitmap_icons_5x8[Icon_q],
+ STATUSBAR_ENCODER_X_POS + 8, STATUSBAR_Y_POS,
+ 5, STATUSBAR_HEIGHT);
+
+ snprintf(buffer, sizeof(buffer), "%d", global_settings.rec_quality);
display->getstringsize(buffer, &width, &height);
if (height <= STATUSBAR_HEIGHT)
- {
- display->putsxy(STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS, buffer);
- }
+ display->putsxy(STATUSBAR_ENCODER_X_POS + 13, STATUSBAR_Y_POS, buffer);
#endif
/* Display Samplerate info in statusbar */
@@ -664,9 +654,8 @@ void gui_statusbar_icon_recording_info(struct screen * display)
STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS,
STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT);
#else
- /* Can't measure S/PDIF sample rate on Archos/Sim yet so
- just display input type */
- snprintf(buffer, sizeof(buffer), "Dg");
+ /* Can't measure S/PDIF sample rate on Archos/Sim yet */
+ snprintf(buffer, sizeof(buffer), "--");
#endif
}
else
@@ -692,17 +681,18 @@ void gui_statusbar_icon_recording_info(struct screen * display)
display->mono_bitmap(bitmap_icons_12x8[freq],
STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS,
STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT);
+ }
#else
/* hwcodec targets have sysfont characters */
snprintf(buffer, sizeof(buffer), "%s", sample_rate[freq]);
display->getstringsize(buffer, &width, &height);
+ }
if (height <= STATUSBAR_HEIGHT)
display->putsxy(STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, buffer);
display->setfont(FONT_UI);
#endif
- }
/* Display Channel status in status bar */
if(global_settings.rec_channels)
{