Core Information - add Core Name / System Manufacturer

This commit is contained in:
twinaphex 2014-12-15 01:59:32 +01:00
parent f2dd126948
commit 969fc38c42
3 changed files with 20 additions and 0 deletions

View File

@ -149,8 +149,12 @@ core_info_list_t *core_info_list_new(const char *modules_path)
unsigned count = 0;
config_get_string(core_info[i].data, "display_name",
&core_info[i].display_name);
config_get_string(core_info[i].data, "corename",
&core_info[i].core_name);
config_get_string(core_info[i].data, "systemname",
&core_info[i].systemname);
config_get_string(core_info[i].data, "manufacturer",
&core_info[i].system_manufacturer);
config_get_uint(core_info[i].data, "firmware_count", &count);
core_info[i].firmware_count = count;
if (config_get_string(core_info[i].data, "supported_extensions",
@ -221,6 +225,7 @@ void core_info_list_free(core_info_list_t *core_info_list)
free(info->path);
free(info->systemname);
free(info->system_manufacturer);
free(info->display_name);
free(info->supported_extensions);
free(info->authors);

View File

@ -40,6 +40,8 @@ typedef struct
char *path;
config_file_t *data;
char *display_name;
char *core_name;
char *system_manufacturer;
char *systemname;
char *supported_extensions;
char *authors;

View File

@ -1468,6 +1468,11 @@ static int deferred_push_core_information(void *data, void *userdata,
char tmp[PATH_MAX];
snprintf(tmp, sizeof(tmp), "Core name: %s",
info->core_name ? info->core_name : "");
menu_list_push(list, tmp, "",
MENU_SETTINGS_CORE_INFO_NONE, 0);
snprintf(tmp, sizeof(tmp), "Core label: %s",
info->display_name ? info->display_name : "");
menu_list_push(list, tmp, "",
MENU_SETTINGS_CORE_INFO_NONE, 0);
@ -1480,6 +1485,14 @@ static int deferred_push_core_information(void *data, void *userdata,
MENU_SETTINGS_CORE_INFO_NONE, 0);
}
if (info->system_manufacturer)
{
snprintf(tmp, sizeof(tmp), "System manufacturer: %s",
info->system_manufacturer);
menu_list_push(list, tmp, "",
MENU_SETTINGS_CORE_INFO_NONE, 0);
}
if (info->categories_list)
{
strlcpy(tmp, "Categories: ", sizeof(tmp));