forked from len0rd/rockbox
Ipods, X5: Proper backlight behaviour on buton unlock.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9788 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1aae0a0e8c
commit
67604c960b
1 changed files with 25 additions and 0 deletions
|
@ -1212,11 +1212,29 @@ static int button_read(void)
|
||||||
btn |= BUTTON_ON;
|
btn |= BUTTON_ON;
|
||||||
|
|
||||||
#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
|
#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
|
||||||
|
static bool hold_button = false;
|
||||||
|
|
||||||
|
/* light handling */
|
||||||
|
if (hold_button && !button_hold())
|
||||||
|
{
|
||||||
|
backlight_on();
|
||||||
|
}
|
||||||
|
hold_button = button_hold();
|
||||||
|
|
||||||
(void)data;
|
(void)data;
|
||||||
/* The int_btn variable is set in the button interrupt handler */
|
/* The int_btn variable is set in the button interrupt handler */
|
||||||
btn = int_btn;
|
btn = int_btn;
|
||||||
|
|
||||||
#elif (CONFIG_KEYPAD == IPOD_3G_PAD)
|
#elif (CONFIG_KEYPAD == IPOD_3G_PAD)
|
||||||
|
static bool hold_button = false;
|
||||||
|
|
||||||
|
/* light handling */
|
||||||
|
if (hold_button && !button_hold())
|
||||||
|
{
|
||||||
|
backlight_on();
|
||||||
|
}
|
||||||
|
hold_button = button_hold();
|
||||||
|
|
||||||
(void)data;
|
(void)data;
|
||||||
btn = ipod_3g_button_read();
|
btn = ipod_3g_button_read();
|
||||||
|
|
||||||
|
@ -1224,6 +1242,13 @@ static int button_read(void)
|
||||||
static bool hold_button = false;
|
static bool hold_button = false;
|
||||||
static bool remote_hold_button = false;
|
static bool remote_hold_button = false;
|
||||||
|
|
||||||
|
/* light handling */
|
||||||
|
if (hold_button && !button_hold())
|
||||||
|
{
|
||||||
|
backlight_on();
|
||||||
|
}
|
||||||
|
/* TODO: add light handling for the remote */
|
||||||
|
|
||||||
hold_button = button_hold();
|
hold_button = button_hold();
|
||||||
remote_hold_button = remote_button_hold();
|
remote_hold_button = remote_button_hold();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue