forked from len0rd/rockbox
A bit of code police, no functional changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18191 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d86255b4a9
commit
ff5533f3ac
1 changed files with 67 additions and 64 deletions
|
@ -164,8 +164,8 @@ bool in_radio_screen(void)
|
|||
return in_screen;
|
||||
}
|
||||
|
||||
/* TODO: Move some more of the control functionality to an HAL and clean up the
|
||||
mess */
|
||||
/* TODO: Move some more of the control functionality to firmware
|
||||
and clean up the mess */
|
||||
|
||||
/* secret flag for starting paused - prevents unmute */
|
||||
#define FMRADIO_START_PAUSED 0x8000
|
||||
|
@ -186,8 +186,7 @@ void radio_start(void)
|
|||
if(radio_status == FMRADIO_OFF)
|
||||
tuner_power(true);
|
||||
|
||||
curr_freq = global_status.last_frequency
|
||||
* fmr->freq_step + fmr->freq_min;
|
||||
curr_freq = global_status.last_frequency * fmr->freq_step + fmr->freq_min;
|
||||
|
||||
tuner_set(RADIO_SLEEP, 0); /* wake up the tuner */
|
||||
|
||||
|
@ -860,8 +859,10 @@ int radio_screen(void)
|
|||
{
|
||||
screens[i].set_viewport(&vp[i]);
|
||||
peak_meter_screen(&screens[i],0,
|
||||
STATUSBAR_HEIGHT + fh*(top_of_screen + 4), fh);
|
||||
screens[i].update_rect(0, STATUSBAR_HEIGHT + fh*(top_of_screen + 4),
|
||||
STATUSBAR_HEIGHT + fh*(top_of_screen + 4),
|
||||
fh);
|
||||
screens[i].update_rect(0,
|
||||
STATUSBAR_HEIGHT + fh*(top_of_screen + 4),
|
||||
screens[i].getwidth(), fh);
|
||||
screens[i].set_viewport(NULL);
|
||||
}
|
||||
|
@ -911,7 +912,8 @@ int radio_screen(void)
|
|||
screens[i].puts_scroll(0, top_of_screen, buf);
|
||||
|
||||
freq = curr_freq / 10000;
|
||||
snprintf(buf, 128, str(LANG_FM_STATION), freq / 100, freq % 100);
|
||||
snprintf(buf, 128, str(LANG_FM_STATION),
|
||||
freq / 100, freq % 100);
|
||||
FOR_NB_SCREENS(i)
|
||||
screens[i].puts_scroll(0, top_of_screen + 1, buf);
|
||||
|
||||
|
@ -1098,16 +1100,16 @@ void radio_load_presets(char *filename)
|
|||
memset(presets, 0, sizeof(presets));
|
||||
num_presets = 0;
|
||||
|
||||
/* No Preset in configuration. */
|
||||
/* No Preset in configuration. */
|
||||
if(filename[0] == '\0')
|
||||
{
|
||||
filepreset[0] = '\0';
|
||||
return;
|
||||
}
|
||||
/* Temporary preset, loaded until player shuts down. */
|
||||
/* Temporary preset, loaded until player shuts down. */
|
||||
else if(filename[0] == '/')
|
||||
strncpy(filepreset, filename, sizeof(filepreset));
|
||||
/* Preset from default directory. */
|
||||
/* Preset from default directory. */
|
||||
else
|
||||
snprintf(filepreset, sizeof(filepreset), "%s/%s.fmr",
|
||||
FMPRESET_PATH, filename);
|
||||
|
@ -1464,7 +1466,7 @@ static int scan_presets(void *viewports)
|
|||
while(curr_freq <= fmr->freq_max)
|
||||
{
|
||||
int freq, frac;
|
||||
if (num_presets >= MAX_PRESETS || action_userabort(TIMEOUT_NOBLOCK))
|
||||
if(num_presets >= MAX_PRESETS || action_userabort(TIMEOUT_NOBLOCK))
|
||||
break;
|
||||
|
||||
freq = curr_freq / 10000;
|
||||
|
@ -1610,7 +1612,8 @@ MAKE_MENU(radio_settings_menu, ID2P(LANG_FM_MENU), NULL,
|
|||
/* main menu of the radio screen */
|
||||
static bool radio_menu(void)
|
||||
{
|
||||
return do_menu(&radio_settings_menu, NULL, NULL, false) == MENU_ATTACHED_USB;
|
||||
return do_menu(&radio_settings_menu, NULL, NULL, false) ==
|
||||
MENU_ATTACHED_USB;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue