mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Cleanups
This commit is contained in:
parent
773f40c71c
commit
9f21d947a2
@ -1286,6 +1286,7 @@ static int generic_action_ok_displaylist_push(const char *path,
|
|||||||
{
|
{
|
||||||
unsigned dl_type = DISPLAYLIST_GENERIC;
|
unsigned dl_type = DISPLAYLIST_GENERIC;
|
||||||
menu_displaylist_info_t info = {0};
|
menu_displaylist_info_t info = {0};
|
||||||
|
const char *menu_label = NULL;
|
||||||
const char *menu_path = NULL;
|
const char *menu_path = NULL;
|
||||||
const char *content_path = NULL;
|
const char *content_path = NULL;
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
@ -1296,6 +1297,9 @@ static int generic_action_ok_displaylist_push(const char *path,
|
|||||||
if (!menu_list)
|
if (!menu_list)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
menu_list_get_last_stack(menu_list,
|
||||||
|
&menu_path, &menu_label, NULL, NULL);
|
||||||
|
|
||||||
switch (action_type)
|
switch (action_type)
|
||||||
{
|
{
|
||||||
case ACTION_OK_DL_OPEN_ARCHIVE_DETECT_CORE:
|
case ACTION_OK_DL_OPEN_ARCHIVE_DETECT_CORE:
|
||||||
@ -1454,39 +1458,28 @@ static int generic_action_ok_displaylist_push(const char *path,
|
|||||||
break;
|
break;
|
||||||
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE:
|
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE:
|
||||||
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH:
|
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH:
|
||||||
|
|
||||||
|
info.type = type;
|
||||||
|
info.directory_ptr = idx;
|
||||||
|
strlcpy(info.path, path, sizeof(info.path));
|
||||||
|
switch (action_type)
|
||||||
{
|
{
|
||||||
const char *menu_path = NULL;
|
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE:
|
||||||
menu_list_get_last_stack(menu_list,
|
strlcpy(info.label,
|
||||||
&menu_path, NULL, NULL, NULL);
|
menu_hash_to_str(MENU_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE), sizeof(info.label));
|
||||||
|
break;
|
||||||
|
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH:
|
||||||
info.type = type;
|
strlcpy(info.label,
|
||||||
info.directory_ptr = idx;
|
menu_hash_to_str(MENU_LABEL_DEFERRED_ARCHIVE_ACTION), sizeof(info.label));
|
||||||
strlcpy(info.path, path, sizeof(info.path));
|
break;
|
||||||
switch (action_type)
|
|
||||||
{
|
|
||||||
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE:
|
|
||||||
strlcpy(info.label,
|
|
||||||
menu_hash_to_str(MENU_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE), sizeof(info.label));
|
|
||||||
break;
|
|
||||||
case ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH:
|
|
||||||
strlcpy(info.label,
|
|
||||||
menu_hash_to_str(MENU_LABEL_DEFERRED_ARCHIVE_ACTION), sizeof(info.label));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
strlcpy(menu->scratch_buf, path, sizeof(menu->scratch_buf));
|
|
||||||
strlcpy(menu->scratch2_buf, menu_path, sizeof(menu->scratch2_buf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strlcpy(menu->scratch_buf, path, sizeof(menu->scratch_buf));
|
||||||
|
strlcpy(menu->scratch2_buf, menu_path, sizeof(menu->scratch2_buf));
|
||||||
break;
|
break;
|
||||||
case ACTION_OK_DL_DIRECTORY_PUSH:
|
case ACTION_OK_DL_DIRECTORY_PUSH:
|
||||||
{
|
{
|
||||||
char cat_path[PATH_MAX_LENGTH] = {0};
|
char cat_path[PATH_MAX_LENGTH] = {0};
|
||||||
const char *menu_path = NULL;
|
|
||||||
const char *menu_label = NULL;
|
|
||||||
|
|
||||||
menu_list_get_last_stack(menu_list,
|
|
||||||
&menu_path, &menu_label, NULL, NULL);
|
|
||||||
|
|
||||||
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user