summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-03-22 16:03:12 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-03-22 22:36:32 +0100
commit5abe98dada389ebe93a356d26127bb9c097df175 (patch)
tree4e0bf6544735eb2fe0295e5c5754511efc5d1c28
parent202717d18fa318cef883ba358b77814f78167117 (diff)
downloadrockbox-5abe98d.tar.gz
rockbox-5abe98d.tar.bz2
rockbox-5abe98d.zip
zenxfi3: fix horrible bug which prevented the power button to work
Change-Id: Ic8e86762f84ca41e931801c1aee08007129eef20
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
index d048099779..7d657a1c6a 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
@@ -160,9 +160,10 @@ int button_read_device(void)
power_ignore_counter = HZ;
}
int res = imx233_button_read(touchpad_btns);
- if(power_ignore_counter >= 0)
- res &= ~BUTTON_POWER;
- else
+ if(power_ignore_counter > 0)
+ {
power_ignore_counter--;
+ res &= ~BUTTON_POWER;
+ }
return res;
}