summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-04-17 11:36:54 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-04-17 11:36:54 +0000
commit7056391eb133a788cc94f571b05f93d962122973 (patch)
tree719c549731438dfb4a26680d11f4f0c72388c758 /firmware
parent27643c65388a7431ed94ec511d05aac3e056d822 (diff)
downloadrockbox-7056391eb133a788cc94f571b05f93d962122973.tar.gz
rockbox-7056391eb133a788cc94f571b05f93d962122973.tar.bz2
rockbox-7056391eb133a788cc94f571b05f93d962122973.zip
Only trigger a wheel press once per click like the OF
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13195 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/button-e200.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/target/arm/sandisk/sansa-e200/button-e200.c b/firmware/target/arm/sandisk/sansa-e200/button-e200.c
index 0490c454c8..725325f811 100644
--- a/firmware/target/arm/sandisk/sansa-e200/button-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/button-e200.c
@@ -72,7 +72,7 @@ int button_read_device(void)
unsigned char state;
static bool hold_button = false;
bool hold_button_old;
- unsigned int new_wheel_value;
+ unsigned int new_wheel_value = 0; /* read later, but this stops a warning */
/* Hold */
hold_button_old = hold_button;
@@ -163,6 +163,11 @@ int button_read_device(void)
}
if( (btn & BUTTON_SCROLL_UP) || (btn & BUTTON_SCROLL_DOWN) ){
+ /* only trigger once per click */
+ if ((new_wheel_value == 0x00) || (new_wheel_value == 0xc0))
+ {
+ btn = BUTTON_NONE;
+ }
if(wheel_backlight_timer==0){
wheel_backlight_on(true);
}