mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
changed the layout of the list and add optional flag for BIOS
This commit is contained in:
parent
ffece5c513
commit
a863dcdeae
@ -75,12 +75,18 @@ static void core_info_list_resolve_all_firmware(core_info_list_t *core_info_list
|
|||||||
|
|
||||||
for (c = 0; c < count; c++)
|
for (c = 0; c < count; c++)
|
||||||
{
|
{
|
||||||
char path_key[64], desc_key[64];
|
char path_key[64], desc_key[64], opt_key[64];
|
||||||
|
|
||||||
|
|
||||||
snprintf(path_key, sizeof(path_key), "firmware%u_path", c);
|
snprintf(path_key, sizeof(path_key), "firmware%u_path", c);
|
||||||
snprintf(desc_key, sizeof(desc_key), "firmware%u_desc", c);
|
snprintf(desc_key, sizeof(desc_key), "firmware%u_desc", c);
|
||||||
|
snprintf(opt_key, sizeof(opt_key), "firmware%u_opt", c);
|
||||||
|
|
||||||
config_get_string(info->data, path_key, &info->firmware[c].path);
|
config_get_string(info->data, path_key, &info->firmware[c].path);
|
||||||
config_get_string(info->data, desc_key, &info->firmware[c].desc);
|
config_get_string(info->data, desc_key, &info->firmware[c].desc);
|
||||||
|
config_get_bool(info->data, opt_key , &info->firmware[c].optional);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ typedef struct
|
|||||||
char *path;
|
char *path;
|
||||||
char *desc;
|
char *desc;
|
||||||
bool missing; // Set once to avoid opening the same file several times.
|
bool missing; // Set once to avoid opening the same file several times.
|
||||||
|
bool optional;
|
||||||
} core_info_firmware_t;
|
} core_info_firmware_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -1926,6 +1926,7 @@ void menu_populate_entries(void *data, unsigned menu_type)
|
|||||||
file_list_push(rgui->selection_buf, "No options available.", RGUI_SETTINGS_CORE_OPTION_NONE, 0);
|
file_list_push(rgui->selection_buf, "No options available.", RGUI_SETTINGS_CORE_OPTION_NONE, 0);
|
||||||
break;
|
break;
|
||||||
case RGUI_SETTINGS_CORE_INFO:
|
case RGUI_SETTINGS_CORE_INFO:
|
||||||
|
<<<<<<< HEAD
|
||||||
file_list_clear(rgui->selection_buf);
|
file_list_clear(rgui->selection_buf);
|
||||||
if (rgui->core_info_current.data)
|
if (rgui->core_info_current.data)
|
||||||
{
|
{
|
||||||
@ -1950,14 +1951,17 @@ void menu_populate_entries(void *data, unsigned menu_type)
|
|||||||
core_info_list_update_missing_firmware(rgui->core_info, rgui->core_info_current.path,
|
core_info_list_update_missing_firmware(rgui->core_info, rgui->core_info_current.path,
|
||||||
g_settings.system_directory);
|
g_settings.system_directory);
|
||||||
|
|
||||||
file_list_push(rgui->selection_buf, "Required firmware:", RGUI_SETTINGS_CORE_INFO_NONE, 0);
|
file_list_push(rgui->selection_buf, "Firmware: ", RGUI_SETTINGS_CORE_INFO_NONE, 0);
|
||||||
for (i = 0; i < rgui->core_info_current.firmware_count; i++)
|
for (i = 0; i < rgui->core_info_current.firmware_count; i++)
|
||||||
{
|
{
|
||||||
if (rgui->core_info_current.firmware[i].desc)
|
if (rgui->core_info_current.firmware[i].desc)
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof(tmp), " Name: %s, %s",
|
snprintf(tmp, sizeof(tmp), " name: %s",
|
||||||
rgui->core_info_current.firmware[i].desc ? rgui->core_info_current.firmware[i].desc : "",
|
rgui->core_info_current.firmware[i].desc ? rgui->core_info_current.firmware[i].desc : "");
|
||||||
rgui->core_info_current.firmware[i].missing ? "missing" : "present");
|
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
|
||||||
|
snprintf(tmp, sizeof(tmp), " status: %s, %s",
|
||||||
|
rgui->core_info_current.firmware[i].missing ? "missing" : "present",
|
||||||
|
rgui->core_info_current.firmware[i].optional ? "optional" : "required");
|
||||||
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
|
file_list_push(rgui->selection_buf, tmp, RGUI_SETTINGS_CORE_INFO_NONE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user