mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Code policing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8989 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ea4dea67ae
commit
4431ab237e
1 changed files with 83 additions and 81 deletions
|
|
@ -355,7 +355,7 @@ static int ipod_3g_button_read(void)
|
|||
{
|
||||
unsigned char source, state;
|
||||
static int was_hold = 0;
|
||||
int btn = BUTTON_NONE;
|
||||
int btn = BUTTON_NONE;
|
||||
/*
|
||||
* we need some delay for g3, cause hold generates several interrupts,
|
||||
* some of them delayed
|
||||
|
|
@ -478,10 +478,11 @@ static void button_tick(void)
|
|||
which doesn't shut down easily with the OFF
|
||||
key */
|
||||
#ifdef HAVE_SW_POWEROFF
|
||||
if ((btn == POWEROFF_BUTTON
|
||||
#ifdef BUTTON_RC_STOP
|
||||
if ((btn == POWEROFF_BUTTON || btn == BUTTON_RC_STOP) &&
|
||||
|| btn == BUTTON_RC_STOP) &&
|
||||
#else
|
||||
if (btn == POWEROFF_BUTTON &&
|
||||
) &&
|
||||
#endif
|
||||
#if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING)
|
||||
!charger_inserted() &&
|
||||
|
|
@ -518,7 +519,8 @@ static void button_tick(void)
|
|||
{
|
||||
if (queue_empty(&button_queue))
|
||||
{
|
||||
queue_post(&button_queue, BUTTON_REPEAT | btn, NULL);
|
||||
queue_post(
|
||||
&button_queue, BUTTON_REPEAT | btn, NULL);
|
||||
post = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue