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
diff --git a/apps/tree.c b/apps/tree.c
index be4edf7..66a163a 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -896,6 +896,8 @@
restore = true;
}
else {
+ if (button & BUTTON_REPEAT)
+ break;
if (numentries < tree_max_on_screen) {
put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor,
false);
@@ -950,6 +952,8 @@
else if (id3db && (tc.firstpos || tc.dirfull)) {
if (tc.dircursor + tc.dirstart + tc.firstpos + 1 >= tc.dirlength) {
/* wrap and load first dir segment */
+ if (button & BUTTON_REPEAT)
+ break;
tc.firstpos = tc.dirstart = tc.dircursor = 0;
}
else {
@@ -960,6 +964,8 @@
restore = true;
}
else {
+ if (button & BUTTON_REPEAT)
+ break;
if(numentries < tree_max_on_screen) {
put_cursorxy(CURSOR_X, CURSOR_Y + tc.dircursor, false);
tc.dirstart = tc.dircursor = 0;
diff --git a/docs/CREDITS b/docs/CREDITS
index 93a2533..5d3c845 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -120,3 +120,4 @@
Ray Lambert
Dave Wiard
Pieter Bos
+Konstantin Isakov