diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-15 07:35:16 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-15 07:35:16 +0000 |
commit | b3a3885a0e286ca4f10d909c68134842b016888a (patch) | |
tree | 44e9f897c6eb6789ccb50fa69ca564958c1331e2 /apps | |
parent | e2a9fe194315508329c8434592edb76cb727c224 (diff) | |
download | rockbox-b3a3885a0e286ca4f10d909c68134842b016888a.tar.gz rockbox-b3a3885a0e286ca4f10d909c68134842b016888a.zip |
Now discards stray BUTTON_REL events
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1750 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/wps.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/wps.c b/apps/wps.c index 9255b86243..91310aa409 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -391,6 +391,7 @@ int wps_show(void) | |||
391 | int old_release_mask; | 391 | int old_release_mask; |
392 | int button; | 392 | int button; |
393 | int ff_rewind_count = 0; | 393 | int ff_rewind_count = 0; |
394 | bool ignore_keyup; | ||
394 | 395 | ||
395 | old_release_mask = button_set_release(RELEASE_MASK); | 396 | old_release_mask = button_set_release(RELEASE_MASK); |
396 | 397 | ||
@@ -401,15 +402,25 @@ int wps_show(void) | |||
401 | lcd_setmargins(0,0); | 402 | lcd_setmargins(0,0); |
402 | #endif | 403 | #endif |
403 | 404 | ||
405 | ff_rewind = false; | ||
406 | ignore_keyup = true; | ||
407 | |||
404 | if(mpeg_is_playing()) | 408 | if(mpeg_is_playing()) |
405 | { | 409 | { |
406 | id3 = mpeg_current_track(); | 410 | id3 = mpeg_current_track(); |
407 | draw_screen(id3); | 411 | draw_screen(id3); |
408 | } | 412 | } |
409 | 413 | ||
410 | while ( 1 ) | 414 | while ( 1 ) |
411 | { | 415 | { |
412 | button = button_get_w_tmo(HZ/5); | 416 | button = button_get_w_tmo(HZ/5); |
417 | |||
418 | /* Discard stray key-up events */ | ||
419 | if(ignore_keyup && (button & BUTTON_REL)) | ||
420 | { | ||
421 | ignore_keyup = false; | ||
422 | continue; | ||
423 | } | ||
413 | 424 | ||
414 | if(mpeg_has_changed_track()) | 425 | if(mpeg_has_changed_track()) |
415 | { | 426 | { |
@@ -755,6 +766,7 @@ int wps_show(void) | |||
755 | statusbar(laststate); | 766 | statusbar(laststate); |
756 | #endif | 767 | #endif |
757 | old_release_mask = button_set_release(RELEASE_MASK); | 768 | old_release_mask = button_set_release(RELEASE_MASK); |
769 | ignore_keyup = true; | ||
758 | id3 = mpeg_current_track(); | 770 | id3 = mpeg_current_track(); |
759 | draw_screen(id3); | 771 | draw_screen(id3); |
760 | } | 772 | } |