summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-23 15:09:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-23 15:09:52 +0000
commit061763b2a679da199f14da5de36b307705b8c7d0 (patch)
tree18bf0be241b29048e00e6ee0b3c5705a0680a2e1
parentb35165649105a2fca40241519234880164bc6fb4 (diff)
downloadrockbox-061763b2a679da199f14da5de36b307705b8c7d0.tar.gz
rockbox-061763b2a679da199f14da5de36b307705b8c7d0.zip
fixed the check for the release events
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2749 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/bounce.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/recorder/bounce.c b/apps/recorder/bounce.c
index a1f22b56fa..f89f699862 100644
--- a/apps/recorder/bounce.c
+++ b/apps/recorder/bounce.c
@@ -243,15 +243,13 @@ static int scrollit(void)
char rock[]="Rockbox! Pure pleasure. Pure fun. Oooh. What fun! ;-) ";
int letter;
- while(button_get(false) & BUTTON_REL);
-
lcd_clear_display();
while(1)
{
b = button_get_w_tmo(HZ/10);
- if ( b & BUTTON_OFF )
+ if ( b == (BUTTON_OFF|BUTTON_REL) )
return 0;
- else if ( b & BUTTON_ON )
+ else if ( b == (BUTTON_ON|BUTTON_REL) )
return 1;
lcd_clear_display();
@@ -297,15 +295,13 @@ static int loopit(void)
int timeout=0;
char buffer[30];
- while(button_get(false) & BUTTON_REL);
-
lcd_clear_display();
while(1)
{
b = button_get_w_tmo(HZ/10);
- if ( b & BUTTON_OFF )
+ if ( b == (BUTTON_OFF|BUTTON_REL) )
return 0;
- if ( b & BUTTON_ON )
+ if ( b == (BUTTON_ON|BUTTON_REL) )
return 1;
else if(b != BUTTON_NONE)
timeout=20;