1
0
Fork 0
forked from len0rd/rockbox

Fixed a couple of problems with Zagor's commit, along with some of my own CUSTOM_WPS problems

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2069 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Justin Heiner 2002-08-30 01:34:56 +00:00
parent 1c4f60f7cb
commit 7e11b62d19
2 changed files with 22 additions and 2 deletions

View file

@ -124,10 +124,11 @@ static void draw_screen(void)
char* szPeriod; char* szPeriod;
char szArtist[26]; char szArtist[26];
char szBuff[257]; char szBuff[257];
szBuff[sizeof(szBuff)-1] = 0;
#ifdef CUSTOM_WPS #ifdef CUSTOM_WPS
int tmpcnt = 0; int tmpcnt = 0;
#endif #endif
szBuff[sizeof(szBuff)-1] = 0;
strncpy(szBuff, id3->path, sizeof(szBuff)); strncpy(szBuff, id3->path, sizeof(szBuff));
szTok = strtok_r(szBuff, "/", &end); szTok = strtok_r(szBuff, "/", &end);
@ -375,6 +376,16 @@ bool refresh_wps(bool refresh_scroll)
bool load_custom_wps(void) bool load_custom_wps(void)
{ {
#ifdef SIMULATOR
snprintf(custom_wps[0],sizeof(custom_wps[0]),"%s","%s%pp/%pe: %?%it - %ia%:%fn%?");
snprintf(custom_wps[1],sizeof(custom_wps[1]),"%s","%pc/%pt");
snprintf(custom_wps[2],sizeof(custom_wps[2]),"%s","%it");
snprintf(custom_wps[3],sizeof(custom_wps[3]),"%s","%id");
snprintf(custom_wps[4],sizeof(custom_wps[4]),"%s","%ia");
snprintf(custom_wps[5],sizeof(custom_wps[5]),"%s","%id");
scroll_line_custom = 0;
return(true);
#else
int fd; int fd;
int l = 0; int l = 0;
int numread = 1; int numread = 1;
@ -419,6 +430,7 @@ bool load_custom_wps(void)
scroll_line_custom = l; scroll_line_custom = l;
} }
return(true); return(true);
#endif
} }
bool display_custom_wps(int x_val, int y_val, bool do_scroll, char *wps_string) bool display_custom_wps(int x_val, int y_val, bool do_scroll, char *wps_string)
@ -654,6 +666,7 @@ int player_id3_show(void)
case BUTTON_STOP: case BUTTON_STOP:
case BUTTON_PLAY: case BUTTON_PLAY:
lcd_stop_scroll(); lcd_stop_scroll();
draw_screen();
return(0); return(0);
break; break;
@ -1049,6 +1062,7 @@ static bool keylock(void)
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
lcd_icon(ICON_RECORD, true); lcd_icon(ICON_RECORD, true);
lcd_icon(ICON_PARAM, false);
#endif #endif
display_keylock_text(true); display_keylock_text(true);
keys_locked = true; keys_locked = true;
@ -1140,6 +1154,7 @@ static bool menu(void)
mpeg_sound_set(SOUND_VOLUME, 0); mpeg_sound_set(SOUND_VOLUME, 0);
muted = !muted; muted = !muted;
display_mute_text(muted); display_mute_text(muted);
exit = true;
break; break;
/* key lock */ /* key lock */
@ -1190,6 +1205,7 @@ static bool menu(void)
lcd_icon(ICON_PARAM, false); lcd_icon(ICON_PARAM, false);
lcd_icon(ICON_AUDIO, true); lcd_icon(ICON_AUDIO, true);
draw_screen(); draw_screen();
exit = true;
break; break;
#endif #endif
@ -1242,7 +1258,11 @@ int wps_show(void)
id3 = mpeg_current_track(); id3 = mpeg_current_track();
if (id3) { if (id3) {
draw_screen(); draw_screen();
#ifdef CUSTOM_WPS
refresh_wps(false);
#else
display_file_time(); display_file_time();
#endif
} }
restore = true; restore = true;
} }