mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 16:20:39 +00:00
(menu_displaylist.c) Create core_name variable
This commit is contained in:
parent
33f65dae57
commit
e67cb7650c
@ -5775,12 +5775,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
for (i = 0; i < cores_names_size; i++)
|
for (i = 0; i < cores_names_size; i++)
|
||||||
{
|
{
|
||||||
const char *core_path = cores_paths->elems[i].data;
|
const char *core_path = cores_paths->elems[i].data;
|
||||||
|
const char *core_name = cores_names->elems[i].data;
|
||||||
|
|
||||||
if ( !path_is_empty(RARCH_PATH_CORE) &&
|
if ( !path_is_empty(RARCH_PATH_CORE) &&
|
||||||
string_is_equal(core_path, path_get(RARCH_PATH_CORE)))
|
string_is_equal(core_path, path_get(RARCH_PATH_CORE)))
|
||||||
{
|
{
|
||||||
strlcpy(new_path_entry, core_path, sizeof(new_path_entry));
|
strlcpy(new_path_entry, core_path, sizeof(new_path_entry));
|
||||||
snprintf(new_entry, sizeof(new_entry), "Current core (%s)", cores_names->elems[i].data);
|
snprintf(new_entry, sizeof(new_entry), "Current core (%s)", core_name);
|
||||||
if (type == DISPLAYLIST_CORES_COLLECTION_SUPPORTED)
|
if (type == DISPLAYLIST_CORES_COLLECTION_SUPPORTED)
|
||||||
{
|
{
|
||||||
new_lbl_entry[0] = '\0';
|
new_lbl_entry[0] = '\0';
|
||||||
@ -5809,8 +5810,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_entries_set_alt_at_offset(info->list, j,
|
menu_entries_set_alt_at_offset(info->list, j, core_name);
|
||||||
cores_names->elems[i].data);
|
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5886,11 +5886,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
|
|
||||||
for (i = 0; i < cores_names_size; i++)
|
for (i = 0; i < cores_names_size; i++)
|
||||||
{
|
{
|
||||||
|
const char *core_path = cores_paths->elems[i].data;
|
||||||
|
const char *core_name = cores_names->elems[i].data;
|
||||||
|
|
||||||
if ( !path_is_empty(RARCH_PATH_CORE) &&
|
if ( !path_is_empty(RARCH_PATH_CORE) &&
|
||||||
string_is_equal(cores_paths->elems[i].data, path_get(RARCH_PATH_CORE)))
|
string_is_equal(core_path, path_get(RARCH_PATH_CORE)))
|
||||||
{
|
{
|
||||||
strlcpy(new_path_entry, cores_paths->elems[i].data, sizeof(new_path_entry));
|
strlcpy(new_path_entry, core_path, sizeof(new_path_entry));
|
||||||
snprintf(new_entry, sizeof(new_entry), "Current core (%s)", cores_names->elems[i].data);
|
snprintf(new_entry, sizeof(new_entry), "Current core (%s)", core_name);
|
||||||
if (type == DISPLAYLIST_CORES_COLLECTION_SUPPORTED)
|
if (type == DISPLAYLIST_CORES_COLLECTION_SUPPORTED)
|
||||||
{
|
{
|
||||||
new_lbl_entry[0] = '\0';
|
new_lbl_entry[0] = '\0';
|
||||||
@ -5898,29 +5901,28 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strlcpy(new_lbl_entry, cores_paths->elems[i].data, sizeof(new_lbl_entry));
|
strlcpy(new_lbl_entry, core_path, sizeof(new_lbl_entry));
|
||||||
new_type = MENU_ENUM_LABEL_DETECT_CORE_LIST_OK_CURRENT_CORE;
|
new_type = MENU_ENUM_LABEL_DETECT_CORE_LIST_OK_CURRENT_CORE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (core_path)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case DISPLAYLIST_CORES_COLLECTION_SUPPORTED:
|
case DISPLAYLIST_CORES_COLLECTION_SUPPORTED:
|
||||||
menu_entries_append_enum(info->list, cores_paths->elems[i].data, "",
|
menu_entries_append_enum(info->list, core_path, "",
|
||||||
MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION,
|
MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION,
|
||||||
FILE_TYPE_CORE, 0, 0);
|
FILE_TYPE_CORE, 0, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
menu_entries_append_enum(info->list, cores_paths->elems[i].data,
|
menu_entries_append_enum(info->list, core_path,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_DETECT_CORE_LIST_OK),
|
msg_hash_to_str(MENU_ENUM_LABEL_DETECT_CORE_LIST_OK),
|
||||||
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK,
|
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK,
|
||||||
FILE_TYPE_CORE, 0, 0);
|
FILE_TYPE_CORE, 0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_entries_set_alt_at_offset(info->list, j,
|
menu_entries_set_alt_at_offset(info->list, j, core_name);
|
||||||
cores_names->elems[i].data);
|
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user