diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings_menu.c | 2 | ||||
-rw-r--r-- | apps/wps.c | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 75950c3a96..33dee69aea 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -98,7 +98,7 @@ static Menu wps_set(void) | |||
98 | { | 98 | { |
99 | #ifdef HAVE_LCD_BITMAP | 99 | #ifdef HAVE_LCD_BITMAP |
100 | #ifdef CUSTOM_WPS | 100 | #ifdef CUSTOM_WPS |
101 | char* names[] = { "ID3 Tags", "File ", "Parse ", "Custom WPS" }; | 101 | char* names[] = { "ID3 Tags", "File ", "Parse ", "Custom WPS " }; |
102 | set_option("[WPS display]", &global_settings.wps_display, names, 4 ); | 102 | set_option("[WPS display]", &global_settings.wps_display, names, 4 ); |
103 | #else | 103 | #else |
104 | char* names[] = { "ID3 Tags", "File ", "Parse " }; | 104 | char* names[] = { "ID3 Tags", "File ", "Parse " }; |
diff --git a/apps/wps.c b/apps/wps.c index d7d4279a71..1cb1c98c8d 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -124,10 +124,11 @@ static void draw_screen(void) | |||
124 | char* szPeriod; | 124 | char* szPeriod; |
125 | char szArtist[26]; | 125 | char szArtist[26]; |
126 | char szBuff[257]; | 126 | char szBuff[257]; |
127 | szBuff[sizeof(szBuff)-1] = 0; | ||
128 | #ifdef CUSTOM_WPS | 127 | #ifdef CUSTOM_WPS |
129 | int tmpcnt = 0; | 128 | int tmpcnt = 0; |
130 | #endif | 129 | #endif |
130 | |||
131 | szBuff[sizeof(szBuff)-1] = 0; | ||
131 | strncpy(szBuff, id3->path, sizeof(szBuff)); | 132 | strncpy(szBuff, id3->path, sizeof(szBuff)); |
132 | 133 | ||
133 | szTok = strtok_r(szBuff, "/", &end); | 134 | szTok = strtok_r(szBuff, "/", &end); |
@@ -375,6 +376,16 @@ bool refresh_wps(bool refresh_scroll) | |||
375 | 376 | ||
376 | bool load_custom_wps(void) | 377 | bool load_custom_wps(void) |
377 | { | 378 | { |
379 | #ifdef SIMULATOR | ||
380 | snprintf(custom_wps[0],sizeof(custom_wps[0]),"%s","%s%pp/%pe: %?%it - %ia%:%fn%?"); | ||
381 | snprintf(custom_wps[1],sizeof(custom_wps[1]),"%s","%pc/%pt"); | ||
382 | snprintf(custom_wps[2],sizeof(custom_wps[2]),"%s","%it"); | ||
383 | snprintf(custom_wps[3],sizeof(custom_wps[3]),"%s","%id"); | ||
384 | snprintf(custom_wps[4],sizeof(custom_wps[4]),"%s","%ia"); | ||
385 | snprintf(custom_wps[5],sizeof(custom_wps[5]),"%s","%id"); | ||
386 | scroll_line_custom = 0; | ||
387 | return(true); | ||
388 | #else | ||
378 | int fd; | 389 | int fd; |
379 | int l = 0; | 390 | int l = 0; |
380 | int numread = 1; | 391 | int numread = 1; |
@@ -419,6 +430,7 @@ bool load_custom_wps(void) | |||
419 | scroll_line_custom = l; | 430 | scroll_line_custom = l; |
420 | } | 431 | } |
421 | return(true); | 432 | return(true); |
433 | #endif | ||
422 | } | 434 | } |
423 | 435 | ||
424 | bool display_custom_wps(int x_val, int y_val, bool do_scroll, char *wps_string) | 436 | 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) | |||
654 | case BUTTON_STOP: | 666 | case BUTTON_STOP: |
655 | case BUTTON_PLAY: | 667 | case BUTTON_PLAY: |
656 | lcd_stop_scroll(); | 668 | lcd_stop_scroll(); |
669 | draw_screen(); | ||
657 | return(0); | 670 | return(0); |
658 | break; | 671 | break; |
659 | 672 | ||
@@ -1049,6 +1062,7 @@ static bool keylock(void) | |||
1049 | 1062 | ||
1050 | #ifdef HAVE_LCD_CHARCELLS | 1063 | #ifdef HAVE_LCD_CHARCELLS |
1051 | lcd_icon(ICON_RECORD, true); | 1064 | lcd_icon(ICON_RECORD, true); |
1065 | lcd_icon(ICON_PARAM, false); | ||
1052 | #endif | 1066 | #endif |
1053 | display_keylock_text(true); | 1067 | display_keylock_text(true); |
1054 | keys_locked = true; | 1068 | keys_locked = true; |
@@ -1140,6 +1154,7 @@ static bool menu(void) | |||
1140 | mpeg_sound_set(SOUND_VOLUME, 0); | 1154 | mpeg_sound_set(SOUND_VOLUME, 0); |
1141 | muted = !muted; | 1155 | muted = !muted; |
1142 | display_mute_text(muted); | 1156 | display_mute_text(muted); |
1157 | exit = true; | ||
1143 | break; | 1158 | break; |
1144 | 1159 | ||
1145 | /* key lock */ | 1160 | /* key lock */ |
@@ -1190,6 +1205,7 @@ static bool menu(void) | |||
1190 | lcd_icon(ICON_PARAM, false); | 1205 | lcd_icon(ICON_PARAM, false); |
1191 | lcd_icon(ICON_AUDIO, true); | 1206 | lcd_icon(ICON_AUDIO, true); |
1192 | draw_screen(); | 1207 | draw_screen(); |
1208 | exit = true; | ||
1193 | break; | 1209 | break; |
1194 | #endif | 1210 | #endif |
1195 | 1211 | ||
@@ -1242,7 +1258,11 @@ int wps_show(void) | |||
1242 | id3 = mpeg_current_track(); | 1258 | id3 = mpeg_current_track(); |
1243 | if (id3) { | 1259 | if (id3) { |
1244 | draw_screen(); | 1260 | draw_screen(); |
1261 | #ifdef CUSTOM_WPS | ||
1262 | refresh_wps(false); | ||
1263 | #else | ||
1245 | display_file_time(); | 1264 | display_file_time(); |
1265 | #endif | ||
1246 | } | 1266 | } |
1247 | restore = true; | 1267 | restore = true; |
1248 | } | 1268 | } |