summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/iaudio/m3/button-m3.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-13 13:06:18 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-13 13:37:21 -0400
commit4a3d04654580b1771fcda3492491843d5eac10ad (patch)
treec93aef6dda1960d357e0da146164b0f459c389b3 /firmware/target/coldfire/iaudio/m3/button-m3.c
parentb4865b05b0a3cc45f2873599c6411bef92f40b1c (diff)
downloadrockbox-4a3d046545.tar.gz
rockbox-4a3d046545.tar.bz2
rockbox-4a3d046545.zip
Fix a pile of yellow in the bootloader
Change-Id: Ia89a33bbb13683566e421ac2a002baa20cdb07de
Diffstat (limited to 'firmware/target/coldfire/iaudio/m3/button-m3.c')
-rw-r--r--firmware/target/coldfire/iaudio/m3/button-m3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/button-m3.c b/firmware/target/coldfire/iaudio/m3/button-m3.c
index 3c31c962c8..53d02ec449 100644
--- a/firmware/target/coldfire/iaudio/m3/button-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/button-m3.c
@@ -49,12 +49,16 @@ bool remote_button_hold(void)
int button_read_device(void)
{
int btn = BUTTON_NONE;
+#ifndef BOOTLOADER
bool hold_button_old;
bool remote_hold_button_old;
+#endif
int data;
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
if (!hold_button)
@@ -87,7 +91,9 @@ int button_read_device(void)
/* remote buttons */
data = remote_detect() ? adc_read(ADC_REMOTE) : 0xff;
+#ifndef BOOTLOADER
remote_hold_button_old = remote_hold_button;
+#endif
remote_hold_button = data < 0x14;
#ifndef BOOTLOADER