1
0
Fork 0
forked from len0rd/rockbox

Code police

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15889 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2007-12-07 00:28:16 +00:00
parent a007b558b3
commit 327d78eb6e

View file

@ -1020,7 +1020,8 @@ bool recording_screen(bool no_source)
#endif /* CONFIG_LED */
/* Wait for a button a while (HZ/10) drawing the peak meter */
button = peak_meter_draw_get_btn(pm_x, pm_y, h * PM_HEIGHT, screen_update);
button = peak_meter_draw_get_btn(pm_x, pm_y, h * PM_HEIGHT,
screen_update);
if (last_audio_stat != audio_stat)
{
@ -1050,7 +1051,7 @@ bool recording_screen(bool no_source)
screens[1].clear_display();
snprintf(buf, sizeof(buf), str(LANG_REMOTE_LCD_ON));
screens[1].puts((screens[1].width/w - strlen(buf))/2 + 1,
screens[1].height/(h*2) + 1, buf);
screens[1].height/(h*2) + 1, buf);
screens[1].update();
gui_syncsplash(0, str(LANG_REMOTE_LCD_OFF));
}
@ -1477,7 +1478,8 @@ bool recording_screen(bool no_source)
}
else
#endif /* CONFIG_CODEC == SWCODEC */
if ((global_settings.rec_sizesplit) && (global_settings.rec_split_method))
if ((global_settings.rec_sizesplit) &&
(global_settings.rec_split_method))
{
dmb = dsize/1024/1024;
snprintf(buf, sizeof(buf), "%s %dMB",
@ -1497,13 +1499,15 @@ bool recording_screen(bool no_source)
if(audio_stat & AUDIO_STATUS_PRERECORD)
{
snprintf(buf, sizeof(buf), "%s...", str(LANG_SYSFONT_RECORD_PRERECORD));
snprintf(buf, sizeof(buf), "%s...",
str(LANG_SYSFONT_RECORD_PRERECORD));
}
else
{
/* Display the split interval if the record timesplit
is active */
if ((global_settings.rec_timesplit) && !(global_settings.rec_split_method))
if ((global_settings.rec_timesplit) &&
!(global_settings.rec_split_method))
{
/* Display the record timesplit interval rather
than the file size if the record timer is
@ -1549,12 +1553,13 @@ bool recording_screen(bool no_source)
FAT file size (compatibility) limit. */
if ((audio_stat && !(global_settings.rec_split_method)
&& global_settings.rec_timesplit && (seconds >= dseconds))
|| (audio_stat && global_settings.rec_split_method
&& global_settings.rec_sizesplit && (num_recorded_bytes >= dsize))
|| (num_recorded_bytes >= MAX_FILE_SIZE))
|| (audio_stat && global_settings.rec_split_method
&& global_settings.rec_sizesplit
&& (num_recorded_bytes >= dsize))
|| (num_recorded_bytes >= MAX_FILE_SIZE))
{
if (!(global_settings.rec_split_type)
|| (num_recorded_bytes >= MAX_FILE_SIZE))
|| (num_recorded_bytes >= MAX_FILE_SIZE))
{
rec_command(RECORDING_CMD_START_NEWFILE);
last_seconds = 0;
@ -1577,9 +1582,9 @@ bool recording_screen(bool no_source)
{
if(PM_HEIGHT > 1)
screens[i].puts(0, 2 + filename_offset[i],
str(LANG_SYSFONT_PM_CLIPCOUNT));
str(LANG_SYSFONT_PM_CLIPCOUNT));
screens[i].puts(0, 1 + PM_HEIGHT + filename_offset[i],
clpstr);
clpstr);
}
}
@ -1592,7 +1597,7 @@ bool recording_screen(bool no_source)
{
for(i = 0; i < screen_update; i++)
screens[i].puts_style_offset(0, filename_offset[i] +
PM_HEIGHT + 2, buf, style,0);
PM_HEIGHT + 2, buf, style,0);
}
else
{
@ -1621,9 +1626,11 @@ bool recording_screen(bool no_source)
}
}
else if(0
HAVE_LINE_REC_( || global_settings.rec_source == AUDIO_SRC_LINEIN)
HAVE_FMRADIO_REC_( || global_settings.rec_source == AUDIO_SRC_FMRADIO)
)
HAVE_LINE_REC_( || global_settings.rec_source ==
AUDIO_SRC_LINEIN)
HAVE_FMRADIO_REC_( || global_settings.rec_source ==
AUDIO_SRC_FMRADIO)
)
{
/* Draw LINE or FMRADIO recording gain */
snprintf(buf, sizeof(buf), "%s:%s",
@ -1703,7 +1710,8 @@ bool recording_screen(bool no_source)
break;
} /* end switch */
#ifdef HAVE_AGC
if (screens[i].height < h * (2 + filename_offset[i] + PM_HEIGHT + line[i]))
if (screens[i].height < h * (2 + filename_offset[i] +
PM_HEIGHT + line[i]))
{
line[i] -= 1;
display_agc[i] = false;
@ -1757,11 +1765,12 @@ bool recording_screen(bool no_source)
screens[i].puts_style_offset(0, filename_offset[i] +
PM_HEIGHT + line[i], buf, style,0);
}
else if (
global_settings.rec_source == AUDIO_SRC_MIC
HAVE_LINE_REC_(|| global_settings.rec_source == AUDIO_SRC_LINEIN)
HAVE_FMRADIO_REC_(|| global_settings.rec_source == AUDIO_SRC_FMRADIO)
)
else if (global_settings.rec_source == AUDIO_SRC_MIC
HAVE_LINE_REC_(|| global_settings.rec_source ==
AUDIO_SRC_LINEIN)
HAVE_FMRADIO_REC_(|| global_settings.rec_source ==
AUDIO_SRC_FMRADIO)
)
{
for(i = 0; i < screen_update; i++) {
if (display_agc[i]) {
@ -1853,7 +1862,8 @@ bool recording_screen(bool no_source)
trig_xpos[i] = screens[i].width - trig_width[i];
trig_ypos[i] = ((screens[i].height < 72) && (PM_HEIGHT > 1)) ?
h*2 :
h*(1 + filename_offset[i] + PM_HEIGHT + line[i]
h*(1 + filename_offset[i] + PM_HEIGHT +
line[i]
#ifdef HAVE_AGC
+ 1
#endif
@ -1937,7 +1947,7 @@ rec_abort:
ata_set_led_enabled(true);
#endif
settings_save();
settings_save();
return (rec_status & RCSTAT_BEEN_IN_USB_MODE) != 0;
} /* recording_screen */