Code policing

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8989 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2006-03-10 12:55:13 +00:00
parent ea4dea67ae
commit 4431ab237e

View file

@ -355,7 +355,7 @@ static int ipod_3g_button_read(void)
{ {
unsigned char source, state; unsigned char source, state;
static int was_hold = 0; static int was_hold = 0;
int btn = BUTTON_NONE; int btn = BUTTON_NONE;
/* /*
* we need some delay for g3, cause hold generates several interrupts, * we need some delay for g3, cause hold generates several interrupts,
* some of them delayed * some of them delayed
@ -478,10 +478,11 @@ static void button_tick(void)
which doesn't shut down easily with the OFF which doesn't shut down easily with the OFF
key */ key */
#ifdef HAVE_SW_POWEROFF #ifdef HAVE_SW_POWEROFF
if ((btn == POWEROFF_BUTTON
#ifdef BUTTON_RC_STOP #ifdef BUTTON_RC_STOP
if ((btn == POWEROFF_BUTTON || btn == BUTTON_RC_STOP) && || btn == BUTTON_RC_STOP) &&
#else #else
if (btn == POWEROFF_BUTTON && ) &&
#endif #endif
#if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING) #if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING)
!charger_inserted() && !charger_inserted() &&
@ -518,7 +519,8 @@ static void button_tick(void)
{ {
if (queue_empty(&button_queue)) if (queue_empty(&button_queue))
{ {
queue_post(&button_queue, BUTTON_REPEAT | btn, NULL); queue_post(
&button_queue, BUTTON_REPEAT | btn, NULL);
post = false; post = false;
} }
} }