mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-21 00:05:30 +00:00
Show License in Core Information menu
This commit is contained in:
parent
ee963d8484
commit
b42ed89d23
@ -174,6 +174,12 @@ core_info_list_t *core_info_list_new(const char *modules_path)
|
||||
core_info[i].permissions_list =
|
||||
string_split(core_info[i].permissions, "|");
|
||||
|
||||
if (config_get_string(core_info[i].data, "license",
|
||||
&core_info[i].licenses) &&
|
||||
core_info[i].licenses)
|
||||
core_info[i].licenses_list =
|
||||
string_split(core_info[i].licenses, "|");
|
||||
|
||||
if (config_get_string(core_info[i].data, "notes",
|
||||
&core_info[i].notes) &&
|
||||
core_info[i].notes)
|
||||
@ -213,12 +219,14 @@ void core_info_list_free(core_info_list_t *core_info_list)
|
||||
free(info->supported_extensions);
|
||||
free(info->authors);
|
||||
free(info->permissions);
|
||||
free(info->licenses);
|
||||
free(info->notes);
|
||||
if (info->supported_extensions_list)
|
||||
string_list_free(info->supported_extensions_list);
|
||||
string_list_free(info->authors_list);
|
||||
string_list_free(info->note_list);
|
||||
string_list_free(info->permissions_list);
|
||||
string_list_free(info->licenses_list);
|
||||
config_file_free(info->data);
|
||||
|
||||
for (j = 0; j < info->firmware_count; j++)
|
||||
|
@ -45,11 +45,13 @@ typedef struct
|
||||
char *supported_extensions;
|
||||
char *authors;
|
||||
char *permissions;
|
||||
char *licenses;
|
||||
char *notes;
|
||||
struct string_list *note_list;
|
||||
struct string_list *supported_extensions_list;
|
||||
struct string_list *authors_list;
|
||||
struct string_list *permissions_list;
|
||||
struct string_list *licenses_list;
|
||||
|
||||
core_info_firmware_t *firmware;
|
||||
size_t firmware_count;
|
||||
|
@ -284,6 +284,15 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
|
||||
if (info->licenses_list)
|
||||
{
|
||||
strlcpy(tmp, "License(s): ", sizeof(tmp));
|
||||
string_list_join_concat(tmp, sizeof(tmp),
|
||||
info->licenses_list, ", ");
|
||||
file_list_push(list, tmp, "",
|
||||
MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
|
||||
if (info->supported_extensions_list)
|
||||
{
|
||||
strlcpy(tmp, "Supported extensions: ", sizeof(tmp));
|
||||
|
Loading…
x
Reference in New Issue
Block a user