Get rid of implicit memsets
This commit is contained in:
parent
8453893778
commit
3cdb62b361
|
@ -1576,31 +1576,37 @@ static void xmb_context_destroy_horizontal_list(xmb_handle_t *xmb)
|
||||||
|
|
||||||
static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
||||||
{
|
{
|
||||||
size_t i;
|
menu_displaylist_info_t info;
|
||||||
menu_displaylist_info_t info = {0};
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
xmb->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
info.need_sort = false;
|
||||||
|
info.need_refresh = false;
|
||||||
if (!xmb->horizontal_list)
|
info.need_entries_refresh = false;
|
||||||
return;
|
info.need_push = false;
|
||||||
|
info.push_builtin_cores = false;
|
||||||
|
info.download_core = false;
|
||||||
|
info.need_navigation_clear = false;
|
||||||
info.list = xmb->horizontal_list;
|
info.list = xmb->horizontal_list;
|
||||||
info.menu_list = NULL;
|
info.menu_list = NULL;
|
||||||
info.type = 0;
|
strlcpy(info.path, settings->directory.playlist, sizeof(info.path));
|
||||||
info.flags = 0;
|
info.path_b[0] = '\0';
|
||||||
info.type_default = FILE_TYPE_PLAIN;
|
info.path_c[0] = '\0';
|
||||||
info.enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST;
|
|
||||||
strlcpy(info.label,
|
strlcpy(info.label,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST),
|
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST),
|
||||||
sizeof(info.label));
|
sizeof(info.label));
|
||||||
strlcpy(info.path,
|
info.label_hash = 0;
|
||||||
settings->directory.playlist,
|
strlcpy(info.exts,
|
||||||
sizeof(info.path));
|
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT), sizeof(info.exts));
|
||||||
strlcpy(info.exts, file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT), sizeof(info.exts));
|
info.type = 0;
|
||||||
|
info.type_default = FILE_TYPE_PLAIN;
|
||||||
|
info.directory_ptr = 0;
|
||||||
|
info.flags = 0;
|
||||||
|
info.enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST;
|
||||||
|
info.setting = NULL;
|
||||||
|
|
||||||
if (menu_displaylist_ctl(DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, &info))
|
if (menu_displaylist_ctl(DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, &info))
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
for (i=0; i < xmb->horizontal_list->size; i++)
|
for (i=0; i < xmb->horizontal_list->size; i++)
|
||||||
xmb_node_allocate_userdata(xmb, i);
|
xmb_node_allocate_userdata(xmb, i);
|
||||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||||
|
@ -1737,7 +1743,11 @@ static void xmb_refresh_horizontal_list(xmb_handle_t *xmb)
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
|
xmb->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||||
|
|
||||||
|
if (xmb->horizontal_list)
|
||||||
xmb_init_horizontal_list(xmb);
|
xmb_init_horizontal_list(xmb);
|
||||||
|
|
||||||
xmb_context_reset_horizontal_list(xmb);
|
xmb_context_reset_horizontal_list(xmb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3101,6 +3111,9 @@ static void *xmb_init(void **userdata)
|
||||||
|
|
||||||
menu_display_allocate_white_texture();
|
menu_display_allocate_white_texture();
|
||||||
|
|
||||||
|
xmb->horizontal_list = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||||
|
|
||||||
|
if (xmb->horizontal_list)
|
||||||
xmb_init_horizontal_list(xmb);
|
xmb_init_horizontal_list(xmb);
|
||||||
|
|
||||||
xmb_init_ribbon(xmb);
|
xmb_init_ribbon(xmb);
|
||||||
|
|
|
@ -1583,7 +1583,7 @@ static int create_string_list_rdb_entry_string(
|
||||||
file_list_t *list)
|
file_list_t *list)
|
||||||
{
|
{
|
||||||
char tmp[PATH_MAX_LENGTH];
|
char tmp[PATH_MAX_LENGTH];
|
||||||
union string_list_elem_attr attr = {0};
|
union string_list_elem_attr attr;
|
||||||
char *output_label = NULL;
|
char *output_label = NULL;
|
||||||
int str_len = 0;
|
int str_len = 0;
|
||||||
struct string_list *str_list = string_list_new();
|
struct string_list *str_list = string_list_new();
|
||||||
|
@ -1591,6 +1591,7 @@ static int create_string_list_rdb_entry_string(
|
||||||
if (!str_list)
|
if (!str_list)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
attr.i = 0;
|
||||||
tmp[0] = '\0';
|
tmp[0] = '\0';
|
||||||
|
|
||||||
str_len += strlen(label) + 1;
|
str_len += strlen(label) + 1;
|
||||||
|
@ -1633,7 +1634,7 @@ static int create_string_list_rdb_entry_int(
|
||||||
{
|
{
|
||||||
char tmp[PATH_MAX_LENGTH];
|
char tmp[PATH_MAX_LENGTH];
|
||||||
char str[PATH_MAX_LENGTH];
|
char str[PATH_MAX_LENGTH];
|
||||||
union string_list_elem_attr attr = {0};
|
union string_list_elem_attr attr;
|
||||||
char *output_label = NULL;
|
char *output_label = NULL;
|
||||||
int str_len = 0;
|
int str_len = 0;
|
||||||
struct string_list *str_list = string_list_new();
|
struct string_list *str_list = string_list_new();
|
||||||
|
@ -1641,6 +1642,7 @@ static int create_string_list_rdb_entry_int(
|
||||||
if (!str_list)
|
if (!str_list)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
attr.i = 0;
|
||||||
tmp[0] = str[0] = '\0';
|
tmp[0] = str[0] = '\0';
|
||||||
|
|
||||||
str_len += strlen(label) + 1;
|
str_len += strlen(label) + 1;
|
||||||
|
@ -3529,11 +3531,12 @@ static void menu_displaylist_parse_playlist_associations(
|
||||||
{
|
{
|
||||||
char path_base[PATH_MAX_LENGTH];
|
char path_base[PATH_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
|
union string_list_elem_attr attr;
|
||||||
unsigned found = 0;
|
unsigned found = 0;
|
||||||
union string_list_elem_attr attr = {0};
|
|
||||||
const char *path =
|
const char *path =
|
||||||
path_basename(str_list->elems[i].data);
|
path_basename(str_list->elems[i].data);
|
||||||
|
|
||||||
|
attr.i = 0;
|
||||||
path_base[0] = core_path[0] = '\0';
|
path_base[0] = core_path[0] = '\0';
|
||||||
|
|
||||||
if (!menu_content_playlist_find_associated_core(
|
if (!menu_content_playlist_find_associated_core(
|
||||||
|
@ -6049,10 +6052,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_SHADER_PRESET:
|
case DISPLAYLIST_SHADER_PRESET:
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr = {0};
|
union string_list_elem_attr attr;
|
||||||
struct string_list *str_list = string_list_new();
|
struct string_list *str_list = string_list_new();
|
||||||
|
|
||||||
(void)attr;
|
attr.i = 0;
|
||||||
|
|
||||||
filebrowser_clear_type();
|
filebrowser_clear_type();
|
||||||
info->type_default = FILE_TYPE_SHADER_PRESET;
|
info->type_default = FILE_TYPE_SHADER_PRESET;
|
||||||
|
@ -6072,13 +6075,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_SHADER_PASS:
|
case DISPLAYLIST_SHADER_PASS:
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr = {0};
|
union string_list_elem_attr attr;
|
||||||
struct string_list *str_list = string_list_new();
|
struct string_list *str_list = string_list_new();
|
||||||
|
|
||||||
filebrowser_clear_type();
|
filebrowser_clear_type();
|
||||||
info->type_default = FILE_TYPE_SHADER;
|
info->type_default = FILE_TYPE_SHADER;
|
||||||
|
|
||||||
(void)attr;
|
attr.i = 0;
|
||||||
|
|
||||||
#ifdef HAVE_CG
|
#ifdef HAVE_CG
|
||||||
string_list_append(str_list, "cg", attr);
|
string_list_append(str_list, "cg", attr);
|
||||||
|
@ -6102,9 +6105,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||||
filebrowser_clear_type();
|
filebrowser_clear_type();
|
||||||
info->type_default = FILE_TYPE_IMAGE;
|
info->type_default = FILE_TYPE_IMAGE;
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr = {0};
|
union string_list_elem_attr attr;
|
||||||
struct string_list *str_list = string_list_new();
|
struct string_list *str_list = string_list_new();
|
||||||
|
|
||||||
|
attr.i = 0;
|
||||||
|
|
||||||
#ifdef HAVE_RBMP
|
#ifdef HAVE_RBMP
|
||||||
string_list_append(str_list, "bmp", attr);
|
string_list_append(str_list, "bmp", attr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1595,6 +1595,7 @@ void general_write_handler(void *data)
|
||||||
if (*setting->value.target.boolean)
|
if (*setting->value.target.boolean)
|
||||||
{
|
{
|
||||||
menu_displaylist_info_t info = {0};
|
menu_displaylist_info_t info = {0};
|
||||||
|
|
||||||
info.list = menu_stack;
|
info.list = menu_stack;
|
||||||
info.type = 0;
|
info.type = 0;
|
||||||
info.directory_ptr = 0;
|
info.directory_ptr = 0;
|
||||||
|
@ -1868,10 +1869,10 @@ static bool setting_append_list_input_player_options(
|
||||||
rarch_setting_group_info_t group_info = {0};
|
rarch_setting_group_info_t group_info = {0};
|
||||||
rarch_setting_group_info_t subgroup_info = {0};
|
rarch_setting_group_info_t subgroup_info = {0};
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
rarch_system_info_t *system = NULL;
|
||||||
const char *temp_value = NULL;
|
const char *temp_value = NULL;
|
||||||
const struct retro_keybind* const defaults =
|
const struct retro_keybind* const defaults =
|
||||||
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
|
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
|
||||||
rarch_system_info_t *system = NULL;
|
|
||||||
|
|
||||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue