summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/iriver/h100/button-h100.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-13 14:43:29 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-13 15:48:31 -0400
commitb94db707fb7a8ace5c8821ea47d85ec48ca48e26 (patch)
tree9b0128bd96c8765a8e7abdbe9062e6bcd397da69 /firmware/target/coldfire/iriver/h100/button-h100.c
parent431caa4311c13a0937ae60ac225e780c0a0670b9 (diff)
downloadrockbox-b94db707fb.tar.gz
rockbox-b94db707fb.tar.bz2
rockbox-b94db707fb.zip
Fix more warnings.
Change-Id: Ib3a9fc622a46b1fc72e94dcbc6d29d2e430cd81b
Diffstat (limited to 'firmware/target/coldfire/iriver/h100/button-h100.c')
-rw-r--r--firmware/target/coldfire/iriver/h100/button-h100.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/firmware/target/coldfire/iriver/h100/button-h100.c b/firmware/target/coldfire/iriver/h100/button-h100.c
index dbaefdcf2a..63f772b65e 100644
--- a/firmware/target/coldfire/iriver/h100/button-h100.c
+++ b/firmware/target/coldfire/iriver/h100/button-h100.c
@@ -40,7 +40,7 @@ bool button_hold(void)
}
static bool remote_button_hold_only(void)
-{
+{
if(remote_type() == REMOTETYPE_H300_NONLCD)
return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */
else
@@ -68,14 +68,17 @@ int button_read_device(void)
static bool remote_hold_button = false;
static int prev_data = 0xff;
static int last_valid = 0xff;
+#ifndef BOOTLOADER
bool hold_button_old;
bool remote_hold_button_old;
+#endif
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
-
-
+
#ifndef BOOTLOADER
if (hold_button != hold_button_old)
backlight_hold_changed(hold_button);
@@ -120,7 +123,9 @@ int button_read_device(void)
}
/* remote buttons */
+#ifndef BOOTLOADER
remote_hold_button_old = remote_hold_button;
+#endif
remote_hold_button = remote_button_hold_only();
#ifndef BOOTLOADER