summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c')
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c
index 1d13a21b22..0185186008 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c
@@ -77,10 +77,14 @@ int button_read_device(void)
static int lastbutton;
unsigned short remote_adc;
int btn = BUTTON_NONE;
+#ifndef BOOTLOADER
bool hold_button_old;
+#endif
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
#ifndef BOOTLOADER
@@ -121,7 +125,7 @@ int button_read_device(void)
{
btn |= buttons;
}
-
+
/* the touchpad - only watch the lines we actually read */
touchpad = GPJDAT & touchpad_mask;
@@ -151,7 +155,7 @@ int button_read_device(void)
btn |= BUTTON_LEFT;
}
-
+
/* the cradle buttons */
buttons = ~GPFDAT & 0xc0;
if (buttons)
@@ -163,7 +167,7 @@ int button_read_device(void)
btn |= BUTTON_POWER;
buttonlight_on();
}
-
+
return btn;
}