diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-09-03 11:25:45 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-09-03 11:25:45 +0000 |
commit | a3ea73782f19b98794f958abf4bb9d5700a7965e (patch) | |
tree | 16e0a2c7bf528e83c229c5ed5a7b9a908af5d62c | |
parent | 34835ccd0e4c467a0d4b2af54999fea20befde4c (diff) |
Ignore prev/next up unless last button was down
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2152 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/wps.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/wps.c b/apps/wps.c index 6a672d1df3..440a3e85bf 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -552,10 +552,10 @@ static bool menu(void) button_set_release(old_release_mask); main_menu(); #ifdef HAVE_LCD_BITMAP - if(global_settings.statusbar) - lcd_setmargins(0, STATUSBAR_HEIGHT); - else - lcd_setmargins(0, 0); + if(global_settings.statusbar) + lcd_setmargins(0, STATUSBAR_HEIGHT); + else + lcd_setmargins(0, 0); #endif old_release_mask = button_set_release(RELEASE_MASK); } @@ -632,7 +632,7 @@ static bool menu(void) /* demonstrates showing different formats from playtune */ int wps_show(void) { - int button; + int button, lastbutton = 0; bool ignore_keyup = true; bool restore = false; @@ -743,6 +743,9 @@ int wps_show(void) /* prev / restart */ case BUTTON_LEFT | BUTTON_REL: + if ( lastbutton != BUTTON_LEFT ) + break; + if (!id3 || (id3->elapsed < 3*1000)) mpeg_prev(); else { @@ -758,6 +761,8 @@ int wps_show(void) /* next */ case BUTTON_RIGHT | BUTTON_REL: + if ( lastbutton != BUTTON_RIGHT ) + break; mpeg_next(); break; @@ -820,5 +825,6 @@ int wps_show(void) if (id3) wps_refresh(id3,0,false); } + lastbutton = button; } } |