diff --git a/include/menus/menu_options.h b/include/menus/menu_options.h index 7dc0e38..c9cfd67 100644 --- a/include/menus/menu_options.h +++ b/include/menus/menu_options.h @@ -11,6 +11,7 @@ #define COPY_KEEP_ON_FINISH 0 #define NOTHING_TO_COPY -1 +void FileOptions_ResetClipboard(void); void Menu_ControlDeleteDialog(u64 input); void Menu_TouchDeleteDialog(TouchInfo touchInfo); void Menu_DisplayDeleteDialog(void); diff --git a/source/menus/menu_main.c b/source/menus/menu_main.c index 37c02f6..e06e79b 100644 --- a/source/menus/menu_main.c +++ b/source/menus/menu_main.c @@ -15,13 +15,14 @@ #define MENUBAR_X_BOUNDARY 0 static int menubar_x = -400; +static char multi_select_dir_old[256]; static void Menu_ControlMenuBar(u64 input) { if (input & KEY_A) MENU_DEFAULT_STATE = MENU_STATE_SETTINGS; - if ((input & KEY_Y) || (input & KEY_B)) + if ((input & KEY_MINUS) || (input & KEY_B)) MENU_DEFAULT_STATE = MENU_STATE_HOME; } @@ -52,12 +53,16 @@ static void Menu_DisplayMenuBar(void) static void Menu_HandleMultiSelect(void) { + // multi_select_dir can only hold one dir + strcpy(multi_select_dir_old, cwd); + if (strcmp(multi_select_dir_old, multi_select_dir) != 0) + FileOptions_ResetClipboard(); + char path[256]; File *file = Dirbrowse_GetFileIndex(position); strcpy(path, cwd); strcpy(path + strlen(path), file->name); - - snprintf(multi_select_dir, 256, cwd); + strcpy(multi_select_dir, cwd); if (!multi_select[position]) { diff --git a/source/menus/menu_options.c b/source/menus/menu_options.c index 9c620ad..a6b4d29 100644 --- a/source/menus/menu_options.c +++ b/source/menus/menu_options.c @@ -37,7 +37,7 @@ static int properties_ok_width = 0, properties_ok_height = 0; static int options_cancel_width = 0, options_cancel_height = 0; -static void FileOptions_ResetClipboard(void) +void FileOptions_ResetClipboard(void) { multi_select_index = 0; memset(multi_select, 0, sizeof(multi_select));