2002-05-16 12:53:40 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 Daniel Stenberg
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2002-05-16 14:48:40 +00:00
|
|
|
#include <stdio.h>
|
2002-05-16 12:53:40 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "dir.h"
|
|
|
|
#include "file.h"
|
|
|
|
#include "lcd.h"
|
|
|
|
#include "button.h"
|
|
|
|
#include "kernel.h"
|
|
|
|
#include "tree.h"
|
2002-05-24 15:51:39 +00:00
|
|
|
#include "main_menu.h"
|
2002-05-29 16:38:19 +00:00
|
|
|
#include "sprintf.h"
|
2002-05-30 13:23:03 +00:00
|
|
|
#include "mpeg.h"
|
2002-06-07 14:23:32 +00:00
|
|
|
#include "playlist.h"
|
2002-06-14 10:39:11 +00:00
|
|
|
#include "menu.h"
|
2002-06-25 13:26:04 +00:00
|
|
|
#include "wps.h"
|
2002-05-16 12:53:40 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
|
|
|
#include "icons.h"
|
|
|
|
#endif
|
|
|
|
|
2002-05-28 16:26:12 +00:00
|
|
|
#define MAX_FILES_IN_DIR 200
|
2002-05-16 12:53:40 +00:00
|
|
|
#define TREE_MAX_FILENAMELEN 128
|
|
|
|
#define MAX_DIR_LEVELS 10
|
|
|
|
|
|
|
|
struct entry {
|
|
|
|
bool file; /* true if file, false if dir */
|
|
|
|
char name[TREE_MAX_FILENAMELEN];
|
|
|
|
};
|
|
|
|
|
2002-05-30 14:01:36 +00:00
|
|
|
static struct entry dircache[MAX_FILES_IN_DIR];
|
|
|
|
static struct entry* dircacheptr[MAX_FILES_IN_DIR];
|
2002-05-28 16:26:12 +00:00
|
|
|
static int filesindir;
|
|
|
|
|
2002-05-16 12:53:40 +00:00
|
|
|
void browse_root(void)
|
|
|
|
{
|
|
|
|
dirbrowse("/");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
|
|
|
|
2002-06-18 09:16:47 +00:00
|
|
|
#define TREE_MAX_ON_SCREEN ((LCD_HEIGHT-MARGIN_Y)/LINE_HEIGTH)
|
2002-05-16 12:53:40 +00:00
|
|
|
#define TREE_MAX_LEN_DISPLAY 16 /* max length that fits on screen */
|
|
|
|
|
2002-06-18 09:16:47 +00:00
|
|
|
#define MARGIN_Y 0 /* Y pixel margin */
|
2002-05-16 12:53:40 +00:00
|
|
|
#define MARGIN_X 12 /* X pixel margin */
|
|
|
|
#define LINE_Y 0 /* Y position the entry-list starts at */
|
|
|
|
#define LINE_X 2 /* X position the entry-list starts at */
|
|
|
|
#define LINE_HEIGTH 8 /* pixels for each text line */
|
2002-06-14 08:47:44 +00:00
|
|
|
|
2002-06-18 09:16:47 +00:00
|
|
|
#define CURSOR_Y 0 /* the cursor is not positioned in regard to
|
2002-06-14 08:47:44 +00:00
|
|
|
the margins, so this is the amount of lines
|
|
|
|
we add to the cursor Y position to position
|
|
|
|
it on a line */
|
2002-05-16 12:53:40 +00:00
|
|
|
|
|
|
|
extern unsigned char bitmap_icons_6x8[LastIcon][6];
|
|
|
|
|
|
|
|
#else /* HAVE_LCD_BITMAP */
|
|
|
|
|
|
|
|
#define TREE_MAX_ON_SCREEN 2
|
|
|
|
#define TREE_MAX_LEN_DISPLAY 11 /* max length that fits on screen */
|
|
|
|
#define LINE_Y 0 /* Y position the entry-list starts at */
|
|
|
|
#define LINE_X 1 /* X position the entry-list starts at */
|
|
|
|
|
2002-06-14 08:47:44 +00:00
|
|
|
#define CURSOR_Y 0 /* not really used for players */
|
2002-05-31 09:04:51 +00:00
|
|
|
|
2002-05-16 12:53:40 +00:00
|
|
|
#endif /* HAVE_LCD_BITMAP */
|
|
|
|
|
2002-06-12 08:59:48 +00:00
|
|
|
#ifdef HAVE_RECORDER_KEYPAD
|
|
|
|
#define TREE_NEXT BUTTON_DOWN
|
|
|
|
#define TREE_PREV BUTTON_UP
|
|
|
|
#define TREE_EXIT BUTTON_LEFT
|
|
|
|
#define TREE_ENTER BUTTON_RIGHT
|
|
|
|
#define TREE_MENU BUTTON_F1
|
|
|
|
#else
|
|
|
|
#define TREE_NEXT BUTTON_RIGHT
|
|
|
|
#define TREE_PREV BUTTON_LEFT
|
|
|
|
#define TREE_EXIT BUTTON_STOP
|
|
|
|
#define TREE_ENTER BUTTON_PLAY
|
|
|
|
#define TREE_MENU BUTTON_MENU
|
|
|
|
#endif /* HAVE_RECORDER_KEYPAD */
|
|
|
|
|
2002-05-30 14:01:36 +00:00
|
|
|
static int compare(const void* e1, const void* e2)
|
|
|
|
{
|
|
|
|
return strncmp((*(struct entry**)e1)->name, (*(struct entry**)e2)->name,
|
|
|
|
TREE_MAX_FILENAMELEN);
|
|
|
|
}
|
|
|
|
|
2002-05-28 16:26:12 +00:00
|
|
|
static int showdir(char *path, int start)
|
2002-05-16 12:53:40 +00:00
|
|
|
{
|
2002-05-28 16:26:12 +00:00
|
|
|
static char lastdir[256] = {0};
|
|
|
|
|
2002-05-16 12:53:40 +00:00
|
|
|
#ifdef HAVE_LCD_BITMAP
|
|
|
|
int icon_type = 0;
|
|
|
|
#endif
|
|
|
|
int i;
|
|
|
|
|
2002-05-28 16:26:12 +00:00
|
|
|
/* new dir? cache it */
|
|
|
|
if (strncmp(path,lastdir,sizeof(lastdir))) {
|
|
|
|
DIR *dir = opendir(path);
|
|
|
|
if(!dir)
|
|
|
|
return -1; /* not a directory */
|
2002-05-30 14:01:36 +00:00
|
|
|
memset(dircacheptr,0,sizeof(dircacheptr));
|
2002-05-28 16:26:12 +00:00
|
|
|
for ( i=0; i<MAX_FILES_IN_DIR; i++ ) {
|
|
|
|
struct dirent *entry = readdir(dir);
|
|
|
|
if (!entry)
|
|
|
|
break;
|
|
|
|
if(entry->d_name[0] == '.') {
|
|
|
|
/* skip names starting with a dot */
|
|
|
|
i--;
|
|
|
|
continue;
|
|
|
|
}
|
2002-05-30 14:01:36 +00:00
|
|
|
dircache[i].file = !(entry->attribute & ATTR_DIRECTORY);
|
|
|
|
strncpy(dircache[i].name,entry->d_name,TREE_MAX_FILENAMELEN);
|
|
|
|
dircache[i].name[TREE_MAX_FILENAMELEN-1]=0;
|
|
|
|
dircacheptr[i] = &dircache[i];
|
2002-05-28 16:26:12 +00:00
|
|
|
}
|
|
|
|
filesindir = i;
|
|
|
|
closedir(dir);
|
|
|
|
strncpy(lastdir,path,sizeof(lastdir));
|
|
|
|
lastdir[sizeof(lastdir)-1] = 0;
|
2002-05-30 14:01:36 +00:00
|
|
|
qsort(dircacheptr,filesindir,sizeof(struct entry*),compare);
|
2002-05-28 16:26:12 +00:00
|
|
|
}
|
2002-05-31 12:11:22 +00:00
|
|
|
|
2002-06-12 08:06:13 +00:00
|
|
|
lcd_stop_scroll();
|
2002-05-31 11:16:25 +00:00
|
|
|
#ifdef HAVE_NEW_CHARCELL_LCD
|
|
|
|
lcd_double_height(false);
|
|
|
|
#endif
|
2002-05-28 16:26:12 +00:00
|
|
|
lcd_clear_display();
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
2002-06-12 15:17:34 +00:00
|
|
|
lcd_setmargins(0,MARGIN_Y);
|
|
|
|
lcd_setfont(0);
|
2002-05-28 16:26:12 +00:00
|
|
|
#endif
|
2002-05-16 12:53:40 +00:00
|
|
|
|
2002-05-28 16:26:12 +00:00
|
|
|
for ( i=start; i < start+TREE_MAX_ON_SCREEN; i++ ) {
|
2002-05-29 08:18:46 +00:00
|
|
|
int len;
|
|
|
|
|
|
|
|
if ( i >= filesindir )
|
|
|
|
break;
|
|
|
|
|
2002-05-30 14:01:36 +00:00
|
|
|
len = strlen(dircacheptr[i]->name);
|
2002-05-16 12:53:40 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
2002-06-12 07:45:42 +00:00
|
|
|
if ( dircacheptr[i]->file ) {
|
2002-06-18 08:23:07 +00:00
|
|
|
if(!strcasecmp(&dircacheptr[i]->name[len-4], ".m3u"))
|
2002-06-12 07:45:42 +00:00
|
|
|
icon_type = Playlist;
|
|
|
|
else
|
|
|
|
icon_type=File;
|
|
|
|
} else
|
2002-05-28 16:32:43 +00:00
|
|
|
icon_type=Folder;
|
2002-05-29 08:18:46 +00:00
|
|
|
lcd_bitmap(bitmap_icons_6x8[icon_type],
|
|
|
|
6, MARGIN_Y+(i-start)*LINE_HEIGTH, 6, 8, true);
|
2002-05-16 12:53:40 +00:00
|
|
|
#endif
|
|
|
|
|
2002-06-10 13:24:27 +00:00
|
|
|
lcd_puts(LINE_X, LINE_Y+i-start, dircacheptr[i]->name);
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
|
|
|
|
2002-05-28 16:26:12 +00:00
|
|
|
return filesindir;
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
|
|
|
|
2002-05-31 12:11:22 +00:00
|
|
|
static int numentries=0;
|
|
|
|
static int dircursor=0;
|
|
|
|
static int start=0;
|
|
|
|
static int dirpos[MAX_DIR_LEVELS];
|
|
|
|
static int cursorpos[MAX_DIR_LEVELS];
|
|
|
|
static int dirlevel=0;
|
2002-06-04 21:44:29 +00:00
|
|
|
static int playing = 0;
|
2002-05-31 12:11:22 +00:00
|
|
|
static char currdir[255];
|
|
|
|
|
|
|
|
/* QUICK HACK! this should be handled by the playlist code later */
|
2002-06-26 23:25:03 +00:00
|
|
|
char* peek_next_track(int steps)
|
2002-05-31 12:11:22 +00:00
|
|
|
{
|
|
|
|
static char buf[256];
|
|
|
|
|
2002-06-04 21:44:29 +00:00
|
|
|
/* next-song only works when playing */
|
2002-05-31 12:11:22 +00:00
|
|
|
if (!playing)
|
|
|
|
return NULL;
|
|
|
|
|
2002-06-04 21:44:29 +00:00
|
|
|
switch(playing) {
|
2002-06-25 13:26:04 +00:00
|
|
|
default:
|
|
|
|
case 1:
|
|
|
|
/* play-full-dir mode */
|
2002-06-04 21:44:29 +00:00
|
|
|
|
2002-06-25 13:26:04 +00:00
|
|
|
/* get next track in dir */
|
2002-06-26 23:25:03 +00:00
|
|
|
if ( steps == 1 ) {
|
|
|
|
while (dircursor + start + 1 < numentries ) {
|
|
|
|
if(dircursor+1 < TREE_MAX_ON_SCREEN)
|
|
|
|
dircursor++;
|
|
|
|
else
|
|
|
|
start++;
|
|
|
|
if ( dircacheptr[dircursor+start]->file &&
|
|
|
|
dircacheptr[dircursor+start]->name[strlen(dircacheptr[dircursor+start]->name)-1] == '3') {
|
|
|
|
snprintf(buf,sizeof buf,"%s/%s",
|
|
|
|
currdir, dircacheptr[dircursor+start]->name );
|
|
|
|
return buf;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
while (dircursor + start > 0) {
|
|
|
|
if (dircursor > 0)
|
|
|
|
dircursor--;
|
|
|
|
else
|
|
|
|
start--;
|
|
|
|
if ( dircacheptr[dircursor+start]->file &&
|
|
|
|
dircacheptr[dircursor+start]->name[strlen(dircacheptr[dircursor+start]->name)-1] == '3') {
|
|
|
|
snprintf(buf, sizeof(buf), "%s/%s",
|
|
|
|
currdir, dircacheptr[dircursor+start]->name);
|
|
|
|
return buf;
|
|
|
|
}
|
2002-06-25 13:26:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2002-06-04 21:44:29 +00:00
|
|
|
|
2002-06-25 13:26:04 +00:00
|
|
|
case 2:
|
|
|
|
/* playlist mode */
|
2002-06-26 23:25:03 +00:00
|
|
|
return playlist_next(steps);
|
2002-05-31 12:11:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2002-05-16 12:53:40 +00:00
|
|
|
bool dirbrowse(char *root)
|
|
|
|
{
|
|
|
|
char buf[255];
|
|
|
|
int i;
|
2002-06-18 11:22:48 +00:00
|
|
|
int button;
|
2002-05-16 12:53:40 +00:00
|
|
|
|
|
|
|
memcpy(currdir,root,sizeof(currdir));
|
2002-05-28 16:26:12 +00:00
|
|
|
numentries = showdir(root, start);
|
2002-05-16 12:53:40 +00:00
|
|
|
if (numentries == -1)
|
|
|
|
return -1; /* root is not a directory */
|
|
|
|
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + dircursor, true);
|
2002-06-13 22:38:09 +00:00
|
|
|
if ( numentries )
|
|
|
|
lcd_puts_scroll(LINE_X, LINE_Y+dircursor,
|
|
|
|
dircacheptr[start+dircursor]->name);
|
2002-05-16 12:53:40 +00:00
|
|
|
lcd_update();
|
|
|
|
|
|
|
|
while(1) {
|
2002-06-25 13:26:04 +00:00
|
|
|
bool restore = false;
|
2002-06-18 11:22:48 +00:00
|
|
|
button = button_get(true);
|
|
|
|
|
|
|
|
switch(button) {
|
2002-06-12 08:59:48 +00:00
|
|
|
case TREE_EXIT:
|
2002-05-16 12:53:40 +00:00
|
|
|
i=strlen(currdir);
|
2002-05-21 14:30:54 +00:00
|
|
|
if (i>1) {
|
2002-05-16 12:53:40 +00:00
|
|
|
while (currdir[i-1]!='/')
|
|
|
|
i--;
|
|
|
|
strcpy(buf,&currdir[i]);
|
|
|
|
if (i==1)
|
|
|
|
currdir[i]=0;
|
|
|
|
else
|
|
|
|
currdir[i-1]=0;
|
|
|
|
|
|
|
|
dirlevel--;
|
2002-05-31 07:19:38 +00:00
|
|
|
if ( dirlevel < MAX_DIR_LEVELS ) {
|
2002-05-16 12:53:40 +00:00
|
|
|
start = dirpos[dirlevel];
|
2002-05-31 07:19:38 +00:00
|
|
|
dircursor = cursorpos[dirlevel];
|
|
|
|
}
|
2002-05-16 12:53:40 +00:00
|
|
|
else
|
2002-05-31 07:19:38 +00:00
|
|
|
start = dircursor = 0;
|
2002-06-25 13:26:04 +00:00
|
|
|
restore = true;
|
2002-05-27 14:55:40 +00:00
|
|
|
}
|
2002-05-30 13:23:03 +00:00
|
|
|
else
|
|
|
|
mpeg_stop();
|
2002-05-16 12:53:40 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
2002-06-12 08:59:48 +00:00
|
|
|
case TREE_ENTER:
|
2002-06-25 11:10:24 +00:00
|
|
|
#ifdef HAVE_RECORDER_KEYPAD
|
|
|
|
case BUTTON_PLAY:
|
|
|
|
#endif
|
2002-06-19 20:10:58 +00:00
|
|
|
if ( !numentries )
|
|
|
|
break;
|
2002-05-16 12:53:40 +00:00
|
|
|
if ((currdir[0]=='/') && (currdir[1]==0)) {
|
2002-05-30 14:01:36 +00:00
|
|
|
snprintf(buf,sizeof(buf),"%s%s",currdir,
|
|
|
|
dircacheptr[dircursor+start]->name);
|
2002-05-16 12:53:40 +00:00
|
|
|
} else {
|
2002-05-30 14:01:36 +00:00
|
|
|
snprintf(buf,sizeof(buf),"%s/%s",currdir,
|
|
|
|
dircacheptr[dircursor+start]->name);
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
|
|
|
|
2002-05-30 14:01:36 +00:00
|
|
|
if (!dircacheptr[dircursor+start]->file) {
|
2002-05-16 12:53:40 +00:00
|
|
|
memcpy(currdir,buf,sizeof(currdir));
|
2002-05-31 07:19:38 +00:00
|
|
|
if ( dirlevel < MAX_DIR_LEVELS ) {
|
|
|
|
dirpos[dirlevel] = start;
|
|
|
|
cursorpos[dirlevel] = dircursor;
|
|
|
|
}
|
2002-05-16 12:53:40 +00:00
|
|
|
dirlevel++;
|
|
|
|
dircursor=0;
|
|
|
|
start=0;
|
|
|
|
} else {
|
2002-06-10 13:24:27 +00:00
|
|
|
int len=strlen(dircacheptr[dircursor+start]->name);
|
|
|
|
lcd_stop_scroll();
|
2002-06-04 21:44:29 +00:00
|
|
|
if((len > 4) &&
|
2002-06-18 08:23:07 +00:00
|
|
|
!strcasecmp(&dircacheptr[dircursor+start]->name[len-4],
|
2002-06-12 07:45:42 +00:00
|
|
|
".m3u"))
|
|
|
|
{
|
2002-06-04 21:44:29 +00:00
|
|
|
playing = 2;
|
|
|
|
play_list(currdir, dircacheptr[dircursor+start]->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
playing = 1;
|
2002-06-26 23:25:03 +00:00
|
|
|
mpeg_play(buf);
|
|
|
|
lcd_stop_scroll();
|
|
|
|
wps_show();
|
2002-06-26 23:39:58 +00:00
|
|
|
playing = 0;
|
2002-06-04 21:44:29 +00:00
|
|
|
}
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
2002-06-25 13:26:04 +00:00
|
|
|
restore = true;
|
2002-05-16 12:53:40 +00:00
|
|
|
break;
|
2002-05-16 14:48:40 +00:00
|
|
|
|
2002-06-12 08:59:48 +00:00
|
|
|
case TREE_PREV:
|
2002-05-16 12:53:40 +00:00
|
|
|
if(dircursor) {
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, false);
|
2002-05-16 12:53:40 +00:00
|
|
|
dircursor--;
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
|
2002-05-16 12:53:40 +00:00
|
|
|
lcd_update();
|
|
|
|
}
|
|
|
|
else {
|
2002-05-28 16:26:12 +00:00
|
|
|
if (start) {
|
2002-05-16 12:53:40 +00:00
|
|
|
start--;
|
2002-05-28 16:26:12 +00:00
|
|
|
numentries = showdir(currdir, start);
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2002-05-16 14:48:40 +00:00
|
|
|
|
2002-06-12 08:59:48 +00:00
|
|
|
case TREE_NEXT:
|
2002-05-29 09:00:13 +00:00
|
|
|
if (dircursor + start + 1 < numentries ) {
|
|
|
|
if(dircursor+1 < TREE_MAX_ON_SCREEN) {
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, false);
|
2002-05-29 09:00:13 +00:00
|
|
|
dircursor++;
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
|
2002-05-29 09:00:13 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
start++;
|
|
|
|
numentries = showdir(currdir, start);
|
2002-06-14 08:47:44 +00:00
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
|
2002-05-29 09:00:13 +00:00
|
|
|
}
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
|
|
|
break;
|
2002-05-21 14:30:54 +00:00
|
|
|
|
2002-06-12 08:59:48 +00:00
|
|
|
case TREE_MENU:
|
2002-06-10 13:24:27 +00:00
|
|
|
lcd_stop_scroll();
|
2002-05-21 14:30:54 +00:00
|
|
|
main_menu();
|
2002-06-25 13:26:04 +00:00
|
|
|
restore = true;
|
|
|
|
break;
|
2002-05-21 14:30:54 +00:00
|
|
|
|
2002-06-25 13:26:04 +00:00
|
|
|
case BUTTON_ON:
|
2002-06-25 14:21:06 +00:00
|
|
|
lcd_stop_scroll();
|
2002-06-25 13:26:04 +00:00
|
|
|
wps_show();
|
|
|
|
restore = true;
|
2002-05-21 14:30:54 +00:00
|
|
|
break;
|
2002-06-25 13:26:04 +00:00
|
|
|
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
2002-06-10 13:24:27 +00:00
|
|
|
|
2002-06-25 13:26:04 +00:00
|
|
|
if ( restore ) {
|
|
|
|
/* restore display */
|
|
|
|
numentries = showdir(currdir, start);
|
|
|
|
put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
|
|
|
|
}
|
2002-06-10 13:24:27 +00:00
|
|
|
|
2002-06-25 14:21:06 +00:00
|
|
|
lcd_stop_scroll();
|
|
|
|
if ( numentries )
|
|
|
|
lcd_puts_scroll(LINE_X, LINE_Y+dircursor,
|
|
|
|
dircacheptr[start+dircursor]->name);
|
2002-05-28 16:26:12 +00:00
|
|
|
lcd_update();
|
2002-05-16 12:53:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|