(MaterialUI) Remove some implicit memsets

This commit is contained in:
twinaphex 2016-10-08 19:25:05 +02:00
parent ec243713bd
commit 1cf2799a8a
2 changed files with 11 additions and 5 deletions

View File

@ -532,14 +532,17 @@ static void mui_render_label_value(mui_handle_t *mui,
menu_animation_ctx_ticker_t ticker;
char label_str[PATH_MAX_LENGTH] = {0};
char value_str[PATH_MAX_LENGTH] = {0};
char label_str[PATH_MAX_LENGTH];
char value_str[PATH_MAX_LENGTH];
bool switch_is_on = true;
int value_len = utf8len(value);
int ticker_limit = 0;
uintptr_t texture_switch = 0;
bool do_draw_text = false;
size_t usable_width = width - (mui->margin * 2);
label_str[0] = value_str[0] = '\0';
if (value_len * mui->glyph_width > usable_width / 2)
value_len = (usable_width/2) / mui->glyph_width;
@ -562,7 +565,6 @@ static void mui_render_label_value(mui_handle_t *mui,
mui_draw_text(mui->margin, y + mui->line_height / 2,
width, height, label_str, color, TEXT_ALIGN_LEFT);
bool switch_is_on = true;
if (string_is_equal(value, "disabled") || string_is_equal(value, "off"))
{
if (mui->textures.list[MUI_TEXTURE_SWITCH_OFF]) {

View File

@ -1101,9 +1101,11 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
if (settings->menu.dynamic_wallpaper_enable)
{
char path[PATH_MAX_LENGTH] = {0};
char path[PATH_MAX_LENGTH];
char *tmp = string_replace_substring(xmb->title_name, "/", " ");
path[0] = '\0';
if (tmp)
{
fill_pathname_join_noext(
@ -1410,8 +1412,10 @@ static void xmb_context_reset_horizontal_list(
{
unsigned i;
int depth; /* keep this integer */
char themepath[PATH_MAX_LENGTH];
size_t list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL);
char themepath[PATH_MAX_LENGTH] = {0};
themepath[0] = '\0';
fill_pathname_application_special(themepath, sizeof(themepath),
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB);