diff options
author | Jonas Häggqvist <rasher@rasher.dk> | 2005-06-26 21:43:31 +0000 |
---|---|---|
committer | Jonas Häggqvist <rasher@rasher.dk> | 2005-06-26 21:43:31 +0000 |
commit | ba5f9cf181ee90052dc59934fbc3c664e661b325 (patch) | |
tree | a15b4e5c38ca87ff08eb4e53ad529dd6449443ca /apps | |
parent | 9e376a557dd3ad8a29879ac534b0569428b0c92a (diff) | |
download | rockbox-ba5f9cf181ee90052dc59934fbc3c664e661b325.tar.gz rockbox-ba5f9cf181ee90052dc59934fbc3c664e661b325.zip |
Patch #1218188 by Konstantin Isakov: Don't wrap around scroll in file-browser when button is repeated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6884 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c index be4edf7065..66a163ab8e 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -896,6 +896,8 @@ static bool dirbrowse(void) | |||
896 | restore = true; | 896 | restore = true; |
897 | } | 897 | } |
898 | else { | 898 | else { |
899 | if (button & BUTTON_REPEAT) | ||
900 | break; | ||
899 | if (numentries < tree_max_on_screen) { | 901 | if (numentries < tree_max_on_screen) { |
900 | put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor, | 902 | put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor, |
901 | false); | 903 | false); |
@@ -950,6 +952,8 @@ static bool dirbrowse(void) | |||
950 | else if (id3db && (tc.firstpos || tc.dirfull)) { | 952 | else if (id3db && (tc.firstpos || tc.dirfull)) { |
951 | if (tc.dircursor + tc.dirstart + tc.firstpos + 1 >= tc.dirlength) { | 953 | if (tc.dircursor + tc.dirstart + tc.firstpos + 1 >= tc.dirlength) { |
952 | /* wrap and load first dir segment */ | 954 | /* wrap and load first dir segment */ |
955 | if (button & BUTTON_REPEAT) | ||
956 | break; | ||
953 | tc.firstpos = tc.dirstart = tc.dircursor = 0; | 957 | tc.firstpos = tc.dirstart = tc.dircursor = 0; |
954 | } | 958 | } |
955 | else { | 959 | else { |
@@ -960,6 +964,8 @@ static bool dirbrowse(void) | |||
960 | restore = true; | 964 | restore = true; |
961 | } | 965 | } |
962 | else { | 966 | else { |
967 | if (button & BUTTON_REPEAT) | ||
968 | break; | ||
963 | if(numentries < tree_max_on_screen) { | 969 | if(numentries < tree_max_on_screen) { |
964 | put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor, false); | 970 | put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor, false); |
965 | tc.dirstart = tc.dircursor = 0; | 971 | tc.dirstart = tc.dircursor = 0; |