mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +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++)
|
||||
{
|
||||
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(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, 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 *desc;
|
||||
bool missing; // Set once to avoid opening the same file several times.
|
||||
bool optional;
|
||||
} core_info_firmware_t;
|
||||
|
||||
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);
|
||||
break;
|
||||
case RGUI_SETTINGS_CORE_INFO:
|
||||
<<<<<<< HEAD
|
||||
file_list_clear(rgui->selection_buf);
|
||||
if (rgui->core_info_current.data)
|
||||
{
|
||||
@ -1950,15 +1951,18 @@ void menu_populate_entries(void *data, unsigned menu_type)
|
||||
core_info_list_update_missing_firmware(rgui->core_info, rgui->core_info_current.path,
|
||||
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++)
|
||||
{
|
||||
if (rgui->core_info_current.firmware[i].desc)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp), " Name: %s, %s",
|
||||
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), " name: %s",
|
||||
rgui->core_info_current.firmware[i].desc ? rgui->core_info_current.firmware[i].desc : "");
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user