From aca8970e79d4e312c8bc775b55a33a1e29eb66ad Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 21 Oct 2016 19:14:48 +0200 Subject: [PATCH] CXX_BUILD fixes --- gfx/drivers_font_renderer/freetype.c | 4 ++-- menu/drivers/zarch.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gfx/drivers_font_renderer/freetype.c b/gfx/drivers_font_renderer/freetype.c index 83caa0a9fe..62f1208c65 100644 --- a/gfx/drivers_font_renderer/freetype.c +++ b/gfx/drivers_font_renderer/freetype.c @@ -216,14 +216,14 @@ static void *font_renderer_ft_init(const char *font_path, float font_size) /* TODO: find a better way to determine onmax_glyph_width/height */ handle->max_glyph_width = font_size; handle->max_glyph_height = font_size; - handle->atlas.width = handle->max_glyph_width * 2 * FT_ATLAS_COLS; + handle->atlas.width = handle->max_glyph_width * 2 * FT_ATLAS_COLS; handle->atlas.height = handle->max_glyph_height * 2 * FT_ATLAS_ROWS; handle->atlas.buffer = (uint8_t*) calloc(handle->atlas.width * handle->atlas.height, 1); if (!handle->atlas.buffer) - return false; + goto error; if (!font_renderer_create_atlas(handle)) goto error; diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 9f093831ac..722cd9f571 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -879,7 +879,7 @@ static void zarch_frame(void *data) zui->tmp_block.carr.coords.vertices = 0; - menu_display_font_bind_block(zui->font, &zui->tmp_block); + menu_display_font_bind_block((font_data_t*)zui->font, &zui->tmp_block); menu_display_push_quad(zui->width, zui->height, zui_bg_screen, 0, 0, zui->width, zui->height); @@ -957,7 +957,7 @@ static void zarch_frame(void *data) zui->rendering = false; - menu_display_font_flush_block(zui->font); + menu_display_font_flush_block((font_data_t*)zui->font); menu_display_unset_viewport(); } @@ -1026,7 +1026,7 @@ static void zarch_context_destroy(void *data) if (!zui) return; - menu_display_font_free(zui->font); + menu_display_font_free((font_data_t*)zui->font); zarch_context_bg_destroy(data); zui->font = NULL;