diff options
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 6f29df57cb..207c43f0a6 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -66,6 +66,7 @@ | |||
66 | 66 | ||
67 | static int context; | 67 | static int context; |
68 | static const char *selected_file = NULL; | 68 | static const char *selected_file = NULL; |
69 | static char selected_file_path[MAX_PATH]; | ||
69 | static int selected_file_attr = 0; | 70 | static int selected_file_attr = 0; |
70 | static int onplay_result = ONPLAY_OK; | 71 | static int onplay_result = ONPLAY_OK; |
71 | extern struct menu_item_ex file_menu; /* settings_menu.c */ | 72 | extern struct menu_item_ex file_menu; /* settings_menu.c */ |
@@ -1856,7 +1857,13 @@ int onplay(char* file, int attr, int from, bool hotkey) | |||
1856 | const struct menu_item_ex *menu; | 1857 | const struct menu_item_ex *menu; |
1857 | onplay_result = ONPLAY_OK; | 1858 | onplay_result = ONPLAY_OK; |
1858 | context = from; | 1859 | context = from; |
1859 | selected_file = file; | 1860 | if (file == NULL) |
1861 | selected_file = NULL; | ||
1862 | else | ||
1863 | { | ||
1864 | strlcpy(selected_file_path, file, MAX_PATH); | ||
1865 | selected_file = selected_file_path; | ||
1866 | } | ||
1860 | selected_file_attr = attr; | 1867 | selected_file_attr = attr; |
1861 | int menu_selection; | 1868 | int menu_selection; |
1862 | #ifdef HAVE_HOTKEY | 1869 | #ifdef HAVE_HOTKEY |