diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-24 11:25:59 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-24 11:25:59 +0000 |
| commit | 6795ab3f40393abab2d428459b0558def5985195 (patch) | |
| tree | 7856e50671ab059ddb8d242d6c8c17f9e0bc537c | |
| parent | b899494a7bb8fa2560ad767ef7d1464b5d26bfc7 (diff) | |
| download | rockbox-6795ab3f40393abab2d428459b0558def5985195.zip rockbox-6795ab3f40393abab2d428459b0558def5985195.tar.gz rockbox-6795ab3f40393abab2d428459b0558def5985195.tar.bz2 rockbox-6795ab3f40393abab2d428459b0558def5985195.tar.xz | |
set_bool() now handles key-up events better
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1428 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/settings.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index 9572851..658b71d 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -340,6 +340,7 @@ void settings_display(void) void set_bool(char* string, bool* variable ) { bool done = false; + int button; lcd_clear_display(); lcd_puts_scroll(0,0,string); @@ -348,7 +349,8 @@ void set_bool(char* string, bool* variable ) lcd_puts(0, 1, *variable ? "on " : "off"); lcd_update(); - switch ( button_get(true) ) { + button = button_get(true); + switch ( button ) { #ifdef HAVE_RECORDER_KEYPAD case BUTTON_LEFT: #else @@ -359,7 +361,8 @@ void set_bool(char* string, bool* variable ) break; default: - *variable = !*variable; + if(!(button & BUTTON_REL)) + *variable = !*variable; break; } } |