This commit is contained in:
twinaphex 2016-05-27 04:18:27 +02:00
parent 150d05c160
commit 0d271b0ca7

View File

@ -1587,7 +1587,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
{ {
#ifdef HAVE_LIBRETRODB #ifdef HAVE_LIBRETRODB
unsigned i, j, k; unsigned i, j, k;
char path_playlist[PATH_MAX_LENGTH]; char path_playlist[PATH_MAX_LENGTH] = {0};
char path_base[PATH_MAX_LENGTH] = {0}; char path_base[PATH_MAX_LENGTH] = {0};
char query[PATH_MAX_LENGTH] = {0}; char query[PATH_MAX_LENGTH] = {0};
playlist_t *playlist = NULL; playlist_t *playlist = NULL;
@ -1601,7 +1601,8 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
database_info_build_query(query, sizeof(query), database_info_build_query(query, sizeof(query),
"displaylist_parse_database_entry", info->path_b); "displaylist_parse_database_entry", info->path_b);
if (!(db_info = database_info_list_new(info->path, query))) db_info = database_info_list_new(info->path, query);
if (!db_info)
goto error; goto error;
fill_short_pathname_representation(path_base, info->path, fill_short_pathname_representation(path_base, info->path,
@ -2163,7 +2164,7 @@ static int menu_displaylist_parse_horizontal_list(
{ {
menu_ctx_list_t list_info; menu_ctx_list_t list_info;
menu_ctx_list_t list_horiz_info; menu_ctx_list_t list_horiz_info;
char lpl_basename[PATH_MAX_LENGTH]; char lpl_basename[PATH_MAX_LENGTH] = {0};
char path_playlist[PATH_MAX_LENGTH] = {0}; char path_playlist[PATH_MAX_LENGTH] = {0};
bool is_historylist = false; bool is_historylist = false;
playlist_t *playlist = NULL; playlist_t *playlist = NULL;
@ -2625,22 +2626,21 @@ static int menu_displaylist_parse_options_remappings(
menu_hash_to_str(MENU_LABEL_REMAP_FILE_SAVE_GAME), menu_hash_to_str(MENU_LABEL_REMAP_FILE_SAVE_GAME),
MENU_SETTING_ACTION, 0, 0); MENU_SETTING_ACTION, 0, 0);
if (system)
{
for (p = 0; p < settings->input.max_users; p++) for (p = 0; p < settings->input.max_users; p++)
{ {
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND + 4; retro_id++) for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND + 4; retro_id++)
{ {
char desc_label[64]; char desc_label[64] = {0};
unsigned user = p + 1; unsigned user = p + 1;
unsigned desc_offset = retro_id; unsigned desc_offset = retro_id;
const char *description = NULL; const char *description = system->input_desc_btn[p][desc_offset];
if (desc_offset >= RARCH_FIRST_CUSTOM_BIND) if (desc_offset >= RARCH_FIRST_CUSTOM_BIND)
desc_offset = RARCH_FIRST_CUSTOM_BIND desc_offset = RARCH_FIRST_CUSTOM_BIND
+ (desc_offset - RARCH_FIRST_CUSTOM_BIND) * 2; + (desc_offset - RARCH_FIRST_CUSTOM_BIND) * 2;
if (system)
description = system->input_desc_btn[p][desc_offset];
if (!description) if (!description)
continue; continue;
@ -2652,6 +2652,7 @@ static int menu_displaylist_parse_options_remappings(
(p * (RARCH_FIRST_CUSTOM_BIND + 4)) + retro_id, 0, 0); (p * (RARCH_FIRST_CUSTOM_BIND + 4)) + retro_id, 0, 0);
} }
} }
}
return 0; return 0;
} }
@ -2707,7 +2708,7 @@ static int menu_displaylist_parse_generic(
if (!horizontal && hash_label != MENU_LABEL_CORE_LIST) if (!horizontal && hash_label != MENU_LABEL_CORE_LIST)
{ {
char out_dir[PATH_MAX_LENGTH]; char out_dir[PATH_MAX_LENGTH] = {0};
fill_pathname_parent_dir(out_dir, info->path, sizeof(out_dir)); fill_pathname_parent_dir(out_dir, info->path, sizeof(out_dir));
if (!string_is_empty(out_dir)) if (!string_is_empty(out_dir))
@ -2928,8 +2929,8 @@ static int menu_displaylist_parse_generic(
bool menu_playlist_find_associated_core(const char *path, char *s, size_t len) bool menu_playlist_find_associated_core(const char *path, char *s, size_t len)
{ {
bool ret = false;
unsigned j; unsigned j;
bool ret = false;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
struct string_list *existing_core_names = struct string_list *existing_core_names =
string_split(settings->playlist_names, ";"); string_split(settings->playlist_names, ";");