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 /apps | |
parent | 34835ccd0e4c467a0d4b2af54999fea20befde4c (diff) | |
download | rockbox-a3ea73782f19b98794f958abf4bb9d5700a7965e.tar.gz rockbox-a3ea73782f19b98794f958abf4bb9d5700a7965e.zip |
Ignore prev/next up unless last button was down
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2152 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-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) | |||
552 | button_set_release(old_release_mask); | 552 | button_set_release(old_release_mask); |
553 | main_menu(); | 553 | main_menu(); |
554 | #ifdef HAVE_LCD_BITMAP | 554 | #ifdef HAVE_LCD_BITMAP |
555 | if(global_settings.statusbar) | 555 | if(global_settings.statusbar) |
556 | lcd_setmargins(0, STATUSBAR_HEIGHT); | 556 | lcd_setmargins(0, STATUSBAR_HEIGHT); |
557 | else | 557 | else |
558 | lcd_setmargins(0, 0); | 558 | lcd_setmargins(0, 0); |
559 | #endif | 559 | #endif |
560 | old_release_mask = button_set_release(RELEASE_MASK); | 560 | old_release_mask = button_set_release(RELEASE_MASK); |
561 | } | 561 | } |
@@ -632,7 +632,7 @@ static bool menu(void) | |||
632 | /* demonstrates showing different formats from playtune */ | 632 | /* demonstrates showing different formats from playtune */ |
633 | int wps_show(void) | 633 | int wps_show(void) |
634 | { | 634 | { |
635 | int button; | 635 | int button, lastbutton = 0; |
636 | bool ignore_keyup = true; | 636 | bool ignore_keyup = true; |
637 | bool restore = false; | 637 | bool restore = false; |
638 | 638 | ||
@@ -743,6 +743,9 @@ int wps_show(void) | |||
743 | 743 | ||
744 | /* prev / restart */ | 744 | /* prev / restart */ |
745 | case BUTTON_LEFT | BUTTON_REL: | 745 | case BUTTON_LEFT | BUTTON_REL: |
746 | if ( lastbutton != BUTTON_LEFT ) | ||
747 | break; | ||
748 | |||
746 | if (!id3 || (id3->elapsed < 3*1000)) | 749 | if (!id3 || (id3->elapsed < 3*1000)) |
747 | mpeg_prev(); | 750 | mpeg_prev(); |
748 | else { | 751 | else { |
@@ -758,6 +761,8 @@ int wps_show(void) | |||
758 | 761 | ||
759 | /* next */ | 762 | /* next */ |
760 | case BUTTON_RIGHT | BUTTON_REL: | 763 | case BUTTON_RIGHT | BUTTON_REL: |
764 | if ( lastbutton != BUTTON_RIGHT ) | ||
765 | break; | ||
761 | mpeg_next(); | 766 | mpeg_next(); |
762 | break; | 767 | break; |
763 | 768 | ||
@@ -820,5 +825,6 @@ int wps_show(void) | |||
820 | if (id3) | 825 | if (id3) |
821 | wps_refresh(id3,0,false); | 826 | wps_refresh(id3,0,false); |
822 | } | 827 | } |
828 | lastbutton = button; | ||
823 | } | 829 | } |
824 | } | 830 | } |