forked from len0rd/rockbox
What? Don't players have an OFF button??? ;)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3099 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
68eab383b6
commit
994d598077
1 changed files with 16 additions and 6 deletions
10
apps/tree.c
10
apps/tree.c
|
|
@ -627,6 +627,8 @@ static int onplay_screen(char* dir, char* file)
|
||||||
bool used = false;
|
bool used = false;
|
||||||
bool playing = mpeg_status() & MPEG_STATUS_PLAY;
|
bool playing = mpeg_status() & MPEG_STATUS_PLAY;
|
||||||
char buf[MAX_PATH];
|
char buf[MAX_PATH];
|
||||||
|
struct entry* f = &dircache[dirstart + dircursor];
|
||||||
|
bool isdir = f->attr & ATTR_DIRECTORY;
|
||||||
|
|
||||||
if ((dir[0]=='/') && (dir[1]==0))
|
if ((dir[0]=='/') && (dir[1]==0))
|
||||||
snprintf(buf, sizeof buf, "%s%s", dir, file);
|
snprintf(buf, sizeof buf, "%s%s", dir, file);
|
||||||
|
|
@ -650,11 +652,14 @@ static int onplay_screen(char* dir, char* file)
|
||||||
LCD_WIDTH/2 - 3, LCD_HEIGHT/2 - 4, 7, 8, true);
|
LCD_WIDTH/2 - 3, LCD_HEIGHT/2 - 4, 7, 8, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* don't delete directories */
|
||||||
|
if (!isdir) {
|
||||||
ptr = str(LANG_DELETE);
|
ptr = str(LANG_DELETE);
|
||||||
lcd_getstringsize(ptr,&w,&h);
|
lcd_getstringsize(ptr,&w,&h);
|
||||||
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h/2, ptr);
|
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h/2, ptr);
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
|
lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
|
||||||
LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
|
LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true);
|
||||||
|
}
|
||||||
|
|
||||||
lcd_putsxy(0, LCD_HEIGHT/2 - h/2, str(LANG_RENAME));
|
lcd_putsxy(0, LCD_HEIGHT/2 - h/2, str(LANG_RENAME));
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
||||||
|
|
@ -693,6 +698,9 @@ static int onplay_screen(char* dir, char* file)
|
||||||
|
|
||||||
case BUTTON_RIGHT:
|
case BUTTON_RIGHT:
|
||||||
case BUTTON_ON | BUTTON_RIGHT:
|
case BUTTON_ON | BUTTON_RIGHT:
|
||||||
|
/* don't delete directories */
|
||||||
|
if (isdir)
|
||||||
|
break;
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
lcd_puts(0,0,file);
|
lcd_puts(0,0,file);
|
||||||
|
|
@ -746,9 +754,11 @@ static int onplay_screen(char* dir, char* file)
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef HAVE_RECORDER_KEYPAD
|
||||||
case BUTTON_OFF:
|
case BUTTON_OFF:
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue