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 /apps/settings.c | |
parent | b899494a7bb8fa2560ad767ef7d1464b5d26bfc7 (diff) | |
download | rockbox-6795ab3f40393abab2d428459b0558def5985195.tar.gz rockbox-6795ab3f40393abab2d428459b0558def5985195.zip |
set_bool() now handles key-up events better
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1428 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-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 95728515fa..658b71d69c 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -340,6 +340,7 @@ void settings_display(void) | |||
340 | void set_bool(char* string, bool* variable ) | 340 | void set_bool(char* string, bool* variable ) |
341 | { | 341 | { |
342 | bool done = false; | 342 | bool done = false; |
343 | int button; | ||
343 | 344 | ||
344 | lcd_clear_display(); | 345 | lcd_clear_display(); |
345 | lcd_puts_scroll(0,0,string); | 346 | lcd_puts_scroll(0,0,string); |
@@ -348,7 +349,8 @@ void set_bool(char* string, bool* variable ) | |||
348 | lcd_puts(0, 1, *variable ? "on " : "off"); | 349 | lcd_puts(0, 1, *variable ? "on " : "off"); |
349 | lcd_update(); | 350 | lcd_update(); |
350 | 351 | ||
351 | switch ( button_get(true) ) { | 352 | button = button_get(true); |
353 | switch ( button ) { | ||
352 | #ifdef HAVE_RECORDER_KEYPAD | 354 | #ifdef HAVE_RECORDER_KEYPAD |
353 | case BUTTON_LEFT: | 355 | case BUTTON_LEFT: |
354 | #else | 356 | #else |
@@ -359,7 +361,8 @@ void set_bool(char* string, bool* variable ) | |||
359 | break; | 361 | break; |
360 | 362 | ||
361 | default: | 363 | default: |
362 | *variable = !*variable; | 364 | if(!(button & BUTTON_REL)) |
365 | *variable = !*variable; | ||
363 | break; | 366 | break; |
364 | } | 367 | } |
365 | } | 368 | } |