forked from len0rd/rockbox
Better handling of key-up event in show_info() and show_credits()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1436 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ae9c3f5dc8
commit
ebfff5a43d
1 changed files with 5 additions and 8 deletions
|
@ -106,6 +106,7 @@ int show_logo( void )
|
||||||
void show_credits(void)
|
void show_credits(void)
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
int btn;
|
||||||
|
|
||||||
show_logo();
|
show_logo();
|
||||||
#ifdef HAVE_NEW_CHARCELL_LCD
|
#ifdef HAVE_NEW_CHARCELL_LCD
|
||||||
|
@ -115,7 +116,8 @@ void show_credits(void)
|
||||||
for (j = 0; j < 10; j++) {
|
for (j = 0; j < 10; j++) {
|
||||||
sleep((HZ*2)/10);
|
sleep((HZ*2)/10);
|
||||||
|
|
||||||
if (button_get(false))
|
btn = button_get(false);
|
||||||
|
if (btn != BUTTON_NONE && !(btn & BUTTON_REL))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
roll_credits();
|
roll_credits();
|
||||||
|
@ -150,13 +152,9 @@ void show_info(void)
|
||||||
lcd_puts(0, 3, s);
|
lcd_puts(0, 3, s);
|
||||||
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
button_get(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hold_set(void)
|
/* Wait for a key to be pushed */
|
||||||
{
|
while(button_get(true) & BUTTON_REL);
|
||||||
set_bool( "[Hold]", &global_settings.hold );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main_menu(void)
|
void main_menu(void)
|
||||||
|
@ -165,7 +163,6 @@ void main_menu(void)
|
||||||
|
|
||||||
/* main menu */
|
/* main menu */
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ "Hold", hold_set },
|
|
||||||
{ "Sound Settings", sound_menu },
|
{ "Sound Settings", sound_menu },
|
||||||
{ "General Settings", settings_menu },
|
{ "General Settings", settings_menu },
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue