From b3a3885a0e286ca4f10d909c68134842b016888a Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 15 Aug 2002 07:35:16 +0000 Subject: [PATCH] Now discards stray BUTTON_REL events git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1750 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) int old_release_mask; int button; int ff_rewind_count = 0; + bool ignore_keyup; old_release_mask = button_set_release(RELEASE_MASK); @@ -401,15 +402,25 @@ int wps_show(void) lcd_setmargins(0,0); #endif + ff_rewind = false; + ignore_keyup = true; + if(mpeg_is_playing()) { id3 = mpeg_current_track(); draw_screen(id3); } - + while ( 1 ) { button = button_get_w_tmo(HZ/5); + + /* Discard stray key-up events */ + if(ignore_keyup && (button & BUTTON_REL)) + { + ignore_keyup = false; + continue; + } if(mpeg_has_changed_track()) { @@ -755,6 +766,7 @@ int wps_show(void) statusbar(laststate); #endif old_release_mask = button_set_release(RELEASE_MASK); + ignore_keyup = true; id3 = mpeg_current_track(); draw_screen(id3); }