mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
button: Fix a set-but-unused variable without HAVE_SW_POWEROFF
So wrap the definition and setting of repeat_count with the same #ifdef Change-Id: I8c06ea68eca7e5db960e4fa08a866761e856293e
This commit is contained in:
parent
8e5efb6850
commit
d1f1d1da5e
1 changed files with 6 additions and 2 deletions
|
|
@ -201,7 +201,9 @@ static void button_tick(void)
|
|||
{
|
||||
static int count = 0;
|
||||
static int repeat_speed = REPEAT_INTERVAL_START;
|
||||
#ifdef HAVE_SW_POWEROFF
|
||||
static int repeat_count = 0;
|
||||
#endif
|
||||
static bool repeat = false;
|
||||
static bool post = false;
|
||||
#ifdef HAVE_BACKLIGHT
|
||||
|
|
@ -291,12 +293,12 @@ static void button_tick(void)
|
|||
|
||||
count = repeat_speed;
|
||||
|
||||
#ifdef HAVE_SW_POWEROFF
|
||||
repeat_count++;
|
||||
|
||||
/* Send a SYS_POWEROFF event if we have a device
|
||||
which doesn't shut down easily with the OFF
|
||||
key */
|
||||
#ifdef HAVE_SW_POWEROFF
|
||||
|
||||
if (enable_sw_poweroff &&
|
||||
(btn & POWEROFF_BUTTON
|
||||
#ifdef RC_POWEROFF_BUTTON
|
||||
|
|
@ -336,7 +338,9 @@ static void button_tick(void)
|
|||
{
|
||||
post = true;
|
||||
repeat = true;
|
||||
#ifdef HAVE_SW_POWEROFF
|
||||
repeat_count = 0;
|
||||
#endif
|
||||
/* initial repeat */
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
if (btn & BUTTON_TOUCHSCREEN)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue