diff options
-rw-r--r-- | apps/onplay.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 6221b7386e..0eaac1e1a6 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "button.h" | 32 | #include "button.h" |
33 | #include "kernel.h" | 33 | #include "kernel.h" |
34 | #include "keyboard.h" | 34 | #include "keyboard.h" |
35 | #include "tree.h" | ||
35 | 36 | ||
36 | static char* selected_file = NULL; | 37 | static char* selected_file = NULL; |
37 | static bool reload_dir = false; | 38 | static bool reload_dir = false; |
@@ -49,17 +50,17 @@ static bool delete_file(void) | |||
49 | lcd_clear_display(); | 50 | lcd_clear_display(); |
50 | lcd_puts(0,0,str(LANG_REALLY_DELETE)); | 51 | lcd_puts(0,0,str(LANG_REALLY_DELETE)); |
51 | lcd_puts_scroll(0,1,selected_file); | 52 | lcd_puts_scroll(0,1,selected_file); |
53 | lcd_update(); | ||
52 | 54 | ||
53 | while (!exit) { | 55 | while (!exit) { |
54 | int btn = button_get(true); | 56 | int btn = button_get(true); |
55 | switch (btn) { | 57 | switch (btn) { |
56 | case BUTTON_PLAY: | 58 | case BUTTON_PLAY: |
57 | case BUTTON_PLAY | BUTTON_REL: | ||
58 | if (!remove(selected_file)) { | 59 | if (!remove(selected_file)) { |
59 | reload_dir = true; | 60 | reload_dir = true; |
60 | lcd_clear_display(); | 61 | lcd_clear_display(); |
61 | lcd_puts_scroll(0,0,selected_file); | 62 | lcd_puts(0,0,str(LANG_DELETED)); |
62 | lcd_puts(0,1,str(LANG_DELETED)); | 63 | lcd_puts_scroll(0,1,selected_file); |
63 | lcd_update(); | 64 | lcd_update(); |
64 | sleep(HZ); | 65 | sleep(HZ); |
65 | exit = true; | 66 | exit = true; |
@@ -151,7 +152,9 @@ int onplay(char* file, int attr) | |||
151 | menu[i++] = (struct menu_items) { str(LANG_DELETE), delete_file }; | 152 | menu[i++] = (struct menu_items) { str(LANG_DELETE), delete_file }; |
152 | 153 | ||
153 | menu[i++] = (struct menu_items) { str(LANG_RENAME), rename_file }; | 154 | menu[i++] = (struct menu_items) { str(LANG_RENAME), rename_file }; |
154 | menu[i++] = (struct menu_items) { "VBRfix", vbr_fix }; | 155 | |
156 | if (attr & TREE_ATTR_MPA) | ||
157 | menu[i++] = (struct menu_items) { "VBRfix", vbr_fix }; | ||
155 | 158 | ||
156 | /* DIY menu handling, since we want to exit after selection */ | 159 | /* DIY menu handling, since we want to exit after selection */ |
157 | m = menu_init( menu, i ); | 160 | m = menu_init( menu, i ); |