forked from len0rd/rockbox
Code police raid
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3181 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5cd393c772
commit
fc69875d56
1 changed files with 90 additions and 114 deletions
36
apps/tree.c
36
apps/tree.c
|
|
@ -658,7 +658,7 @@ static int onplay_screen(char* dir, char* file)
|
||||||
snprintf(buf, sizeof buf, "%s/%s", dir, file);
|
snprintf(buf, sizeof buf, "%s/%s", dir, file);
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
{
|
{
|
||||||
int w,h;
|
int w,h;
|
||||||
char* ptr;
|
char* ptr;
|
||||||
|
|
@ -686,11 +686,6 @@ static int onplay_screen(char* dir, char* file)
|
||||||
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
|
||||||
LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
|
LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (playing)
|
|
||||||
lcd_puts(0,0,str(LANG_PLAYER_ONPLAY_1));
|
|
||||||
lcd_puts(0,1,str(LANG_PLAYER_ONPLAY_2));
|
|
||||||
#endif
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -723,15 +718,10 @@ static int onplay_screen(char* dir, char* file)
|
||||||
if (isdir)
|
if (isdir)
|
||||||
break;
|
break;
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
|
||||||
lcd_puts(0,0,file);
|
|
||||||
lcd_puts(0,1,str(LANG_REALLY_DELETE));
|
|
||||||
#else
|
|
||||||
lcd_puts(0,0,str(LANG_REALLY_DELETE));
|
lcd_puts(0,0,str(LANG_REALLY_DELETE));
|
||||||
lcd_puts(0,1,file);
|
lcd_puts(0,1,file);
|
||||||
lcd_puts(0,3,str(LANG_RESUME_CONFIRM_RECORDER));
|
lcd_puts(0,3,str(LANG_RESUME_CONFIRM_RECORDER));
|
||||||
lcd_puts(0,4,str(LANG_RESUME_CANCEL_RECORDER));
|
lcd_puts(0,4,str(LANG_RESUME_CANCEL_RECORDER));
|
||||||
#endif
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
int btn = button_get(true);
|
int btn = button_get(true);
|
||||||
|
|
@ -746,8 +736,8 @@ static int onplay_screen(char* dir, char* file)
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* ignore button releases */
|
/* ignore button releases */
|
||||||
|
|
@ -775,17 +765,13 @@ 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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
lcd_setfont(FONT_UI);
|
lcd_setfont(FONT_UI);
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -835,8 +821,8 @@ static int onplay_screen(char* dir, char* file)
|
||||||
if (playing)
|
if (playing)
|
||||||
queue_add(buf);
|
queue_add(buf);
|
||||||
break;
|
break;
|
||||||
case 2:
|
|
||||||
{
|
case 2: {
|
||||||
char newname[MAX_PATH];
|
char newname[MAX_PATH];
|
||||||
char* ptr = strrchr(buf, '/') + 1;
|
char* ptr = strrchr(buf, '/') + 1;
|
||||||
int pathlen = (ptr - buf);
|
int pathlen = (ptr - buf);
|
||||||
|
|
@ -854,19 +840,12 @@ static int onplay_screen(char* dir, char* file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
|
||||||
lcd_puts(0,0,file);
|
lcd_puts(0,0,file);
|
||||||
lcd_puts(0,1,str(LANG_REALLY_DELETE));
|
lcd_puts(0,1,str(LANG_REALLY_DELETE));
|
||||||
#else
|
|
||||||
lcd_puts(0,0,str(LANG_REALLY_DELETE));
|
|
||||||
lcd_puts(0,1,file);
|
|
||||||
lcd_puts(0,3,str(LANG_RESUME_CONFIRM_RECORDER));
|
|
||||||
lcd_puts(0,4,str(LANG_RESUME_CANCEL_RECORDER));
|
|
||||||
#endif
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
{
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
int btn = button_get(true);
|
int btn = button_get(true);
|
||||||
switch (btn) {
|
switch (btn) {
|
||||||
|
|
@ -880,8 +859,8 @@ static int onplay_screen(char* dir, char* file)
|
||||||
lcd_update();
|
lcd_update();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* ignore button releases */
|
/* ignore button releases */
|
||||||
|
|
@ -890,7 +869,6 @@ static int onplay_screen(char* dir, char* file)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -899,8 +877,6 @@ static int onplay_screen(char* dir, char* file)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen)
|
static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen)
|
||||||
{
|
{
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue