This commit is contained in:
twinaphex 2016-06-03 04:18:28 +02:00
parent 3b83b6d030
commit c2dd8b884e
4 changed files with 34 additions and 28 deletions

View File

@ -226,7 +226,8 @@ static void nk_menu_layout(nk_menu_handle_t *nk)
static void nk_menu_init_device(nk_menu_handle_t *nk)
{
char buf[PATH_MAX_LENGTH];
char buf[PATH_MAX_LENGTH] = {0};
fill_pathname_join(buf, nk->assets_directory,
"DroidSans.ttf", sizeof(buf));
@ -350,7 +351,8 @@ static void nk_menu_context_reset(void *data)
char iconpath[PATH_MAX_LENGTH] = {0};
nk_menu_handle_t *nk = (nk_menu_handle_t*)data;
settings_t *settings = config_get_ptr();
unsigned width, height = 0;
unsigned width = 0;
unsigned height = 0;
video_driver_get_size(&width, &height);

View File

@ -339,8 +339,8 @@ static bool zarch_zui_list_item(zui_t *zui, struct zui_tabbed *tab, int x1, int
const char *label, unsigned item_id, const char *entry, bool selected)
{
menu_animation_ctx_ticker_t ticker;
char title_buf[PATH_MAX_LENGTH];
unsigned ticker_size;
char title_buf[PATH_MAX_LENGTH] = {0};
uint64_t *frame_count = NULL;
unsigned id = zarch_zui_hash(zui, label);
int x2 = x1 + zui->width - 290 - 40;
@ -586,7 +586,7 @@ static void zarch_zui_render_lay_root_load_set_new_path(zui_t *zui,
static int zarch_zui_render_lay_root_load(zui_t *zui,
struct zui_tabbed *tabbed)
{
char parent_dir[PATH_MAX_LENGTH];
char parent_dir[PATH_MAX_LENGTH] = {0};
settings_t *settings = config_get_ptr();
core_info_list_t *list = NULL;
@ -650,7 +650,7 @@ static int zarch_zui_render_lay_root_load(zui_t *zui,
for (i = skip + zui->load_dlist_first; i < size; ++i)
{
char label[PATH_MAX_LENGTH];
char label[PATH_MAX_LENGTH] = {0};
const char *path = NULL;
const char *basename = NULL;
@ -727,7 +727,7 @@ static int zarch_zui_render_lay_root_downloads(
static int zarch_zui_render_lay_root(zui_t *zui)
{
char item[PATH_MAX_LENGTH];
char item[PATH_MAX_LENGTH] = {0};
static struct zui_tabbed tabbed = {~0U};
zarch_zui_tabbed_begin(zui, &tabbed, 0, 0);

View File

@ -129,13 +129,17 @@ static bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info
{
char new_core_path[PATH_MAX_LENGTH] = {0};
const core_info_t *info = NULL;
core_info_list_t *core_info = NULL;
const char *default_info_dir = NULL;
size_t supported = 0;
core_info_list_t *core_info = def_info ?
(core_info_list_t*)def_info->data : NULL;
uint32_t menu_label_hash =
menu_hash_calculate(def_info->menu_label);
const char *default_info_dir = def_info ?
def_info->dir : NULL;
uint32_t menu_label_hash = 0;
if (def_info)
{
menu_label_hash = menu_hash_calculate(def_info->menu_label);
core_info = (core_info_list_t*)def_info->data;
default_info_dir = def_info->dir;
}
if (!string_is_empty(default_info_dir))
{

View File

@ -214,9 +214,9 @@ void menu_shader_manager_save_preset(
const char *basename, bool apply)
{
#ifdef HAVE_SHADER_MANAGER
char buffer[PATH_MAX_LENGTH];
char config_directory[PATH_MAX_LENGTH];
char preset_path[PATH_MAX_LENGTH];
char buffer[PATH_MAX_LENGTH] = {0};
char config_directory[PATH_MAX_LENGTH] = {0};
char preset_path[PATH_MAX_LENGTH] = {0};
unsigned d, type = RARCH_SHADER_NONE;
const char *dirs[3] = {0};
config_file_t *conf = NULL;