summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-08-07 20:51:37 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-08-07 20:51:37 +0000
commitc1d9b156076b9c3789611cd96fda8cb10cc57fe4 (patch)
treede3fcfa3a524388d9ab4dc40af2b832e55348c1a
parent0b709e1feeb945a73a5d9fd03a560c85e07f82c9 (diff)
downloadrockbox-c1d9b156076b9c3789611cd96fda8cb10cc57fe4.zip
rockbox-c1d9b156076b9c3789611cd96fda8cb10cc57fe4.tar.gz
rockbox-c1d9b156076b9c3789611cd96fda8cb10cc57fe4.tar.bz2
rockbox-c1d9b156076b9c3789611cd96fda8cb10cc57fe4.tar.xz
Removing scroll acceleration for the release (don't worry, I've saved the patch)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1603 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tree.c115
1 files changed, 2 insertions, 113 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 68b893c..c1859a6 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -267,7 +267,6 @@ bool dirbrowse(char *root)
int lasti=-1;
int rc;
int button;
- int browse_speed = 0;
memcpy(currdir,root,sizeof(currdir));
@@ -316,7 +315,6 @@ bool dirbrowse(char *root)
#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_PLAY:
#endif
- browse_speed = 0;
if ( !numentries )
break;
if ((currdir[0]=='/') && (currdir[1]==0)) {
@@ -364,61 +362,8 @@ bool dirbrowse(char *root)
restore = true;
break;
- case TREE_PREV | BUTTON_REPEAT:
- browse_speed++; /* increase the browse speed every time we get here */
- if(filesindir) {
- if(dircursor) {
- if (browse_speed < TREE_MAX_ON_SCREEN - 1) {
- /* moving the cursor up through a full screen */
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- false);
- dircursor--;
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- else {
- /* if we have wrapped from the bottom we want to keep up the speed */
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- false);
- dircursor=0;
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- }
- else {
- if (start) {
- /* leaving the cursor at top line and moving screen down */
- if (browse_speed >=TREE_MAX_ON_SCREEN-1)
- start = start - TREE_MAX_ON_SCREEN + 1;
- else
- start--;
- if (start<0)
- start=0;
- numentries = showdir(currdir, start);
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- else {
- /* wrapping to the top in a directory that is not full */
- if (numentries < TREE_MAX_ON_SCREEN) {
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- false);
- dircursor = numentries - 1;
- browse_speed=0;
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- true);
- }
- else {
- /* starting at the very bottom after a wrap */
- start = numentries - TREE_MAX_ON_SCREEN;
- dircursor = TREE_MAX_ON_SCREEN - 1;
- numentries = showdir(currdir, start);
- put_cursorxy(0, CURSOR_Y + LINE_Y +
- TREE_MAX_ON_SCREEN - 1, true);
- }
- }
- }
- }
- break;
case TREE_PREV:
- browse_speed = 0;
+ case TREE_PREV | BUTTON_REPEAT:
if(filesindir) {
if(dircursor) {
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, false);
@@ -451,63 +396,9 @@ bool dirbrowse(char *root)
lcd_update();
}
break;
- case TREE_NEXT | BUTTON_REPEAT:
- browse_speed++; /* increase the browse speed every time we get here */
- if(filesindir)
- {
- if (dircursor + start + 1 < numentries ) {
- if(dircursor+1 < TREE_MAX_ON_SCREEN) {
- if (browse_speed < 7) {
- /* moving the cursor down through a full screen */
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- false);
- dircursor++;
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- else {
- /* if we have wrapped from the bottom we want to keep up the speed */
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- false);
- dircursor=7;
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
-
- }
- else {
- /* leaving the cursor at bottom line and moving screen up */
- if (browse_speed >= TREE_MAX_ON_SCREEN-1)
- /* make sure we do not go past the end of the directory */
- if (start + TREE_MAX_ON_SCREEN - 1 < numentries-TREE_MAX_ON_SCREEN)
- start = start + TREE_MAX_ON_SCREEN -1;
- else
- start = numentries-TREE_MAX_ON_SCREEN;
- else
- start++;
- numentries = showdir(currdir, start);
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- }
- else {
- /* restarting at the top when there is less than 7 files */
- if(numentries < TREE_MAX_ON_SCREEN) {
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor,
- false);
- start = dircursor = browse_speed = 0;
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- else {
- /* restarting at the top when the screen scrolls */
- start = dircursor = 0 ;
- numentries = showdir(currdir, start);
- put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
- }
- }
- lcd_update();
- }
- break;
case TREE_NEXT:
- browse_speed = 0;
+ case TREE_NEXT | BUTTON_REPEAT:
if(filesindir)
{
if (dircursor + start + 1 < numentries ) {
@@ -546,7 +437,6 @@ bool dirbrowse(char *root)
#ifdef HAVE_LCD_BITMAP
bool laststate=statusbar(false);
#endif
- browse_speed = 0;
lcd_stop_scroll();
main_menu();
#ifdef HAVE_LCD_BITMAP
@@ -561,7 +451,6 @@ bool dirbrowse(char *root)
}
case BUTTON_ON:
- browse_speed = 0;
if (mpeg_is_playing())
{
lcd_stop_scroll();