mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Get rid of more instances of string_list in menu code
This commit is contained in:
parent
7d1d8be14e
commit
9e71a566cc
@ -16,7 +16,6 @@
|
||||
#include <file/file_path.h>
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <lists/string_list.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/string_list.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -82,12 +82,14 @@ static int menu_action_sublabel_file_browser_core(file_list_t *list, unsigned ty
|
||||
core_info_find(path, &core_info)
|
||||
&& core_info->licenses_list)
|
||||
{
|
||||
char tmp[MENU_SUBLABEL_MAX_LENGTH];
|
||||
tmp[0] = '\0';
|
||||
unsigned i;
|
||||
/* Add license text */
|
||||
string_list_join_concat(tmp, sizeof(tmp),
|
||||
core_info->licenses_list, ", ");
|
||||
strlcpy(s + _len, tmp, len - _len);
|
||||
for (i = 0; i < core_info->licenses_list->size; i++)
|
||||
{
|
||||
_len += strlcpy(s + _len, core_info->licenses_list->elems[i].data, len - _len);
|
||||
if ((i + 1) < core_info->licenses_list->size)
|
||||
_len += strlcpy(s + _len, ", ", len - _len);
|
||||
}
|
||||
}
|
||||
else /* No license found - set to N/A */
|
||||
strlcpy(s + _len, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len - _len);
|
||||
@ -2078,12 +2080,14 @@ static int action_bind_sublabel_core_updater_entry(
|
||||
&& core_updater_list_get_filename(core_list, path, &entry)
|
||||
&& entry->licenses_list)
|
||||
{
|
||||
char tmp[MENU_SUBLABEL_MAX_LENGTH];
|
||||
tmp[0] = '\0';
|
||||
unsigned i;
|
||||
/* Add license text */
|
||||
string_list_join_concat(tmp, sizeof(tmp),
|
||||
entry->licenses_list, ", ");
|
||||
strlcpy(s + _len, tmp, len - _len);
|
||||
for (i = 0; i < entry->licenses_list->size; i++)
|
||||
{
|
||||
_len += strlcpy(s + _len, entry->licenses_list->elems[i].data, len - _len);
|
||||
if ((i + 1) < entry->licenses_list->size)
|
||||
_len += strlcpy(s + _len, ", ", len - _len);
|
||||
}
|
||||
}
|
||||
else /* No license found - set to N/A */
|
||||
strlcpy(s + _len, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len - _len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user