(Nuklear) Another buildfix

This commit is contained in:
twinaphex 2016-11-06 17:29:12 +01:00
parent f1129d982f
commit 9ce285a077

View File

@ -227,6 +227,8 @@ static void nk_menu_layout(nk_menu_handle_t *nk)
static void nk_menu_init_device(nk_menu_handle_t *nk)
{
const void *image;
int w, h;
char buf[PATH_MAX_LENGTH] = {0};
fill_pathname_join(buf, nk->assets_directory,
@ -236,10 +238,9 @@ static void nk_menu_init_device(nk_menu_handle_t *nk)
nk_alloc.alloc = nk_common_mem_alloc;
nk_alloc.free = nk_common_mem_free;
nk_buffer_init(&device.cmds, &nk_alloc, 1024);
const void *image; int w, h;
nk_font_atlas_init_default(&atlas);
nk_font_atlas_begin(&atlas);
font = nk_font_atlas_add_default(&atlas, 13.0f, NULL);
font = nk_font_atlas_add_default(&atlas, 13.0f, NULL);
image = nk_font_atlas_bake(&atlas, &w, &h, NK_FONT_ATLAS_RGBA32);
device_upload_atlas(&device, image, w, h);
nk_font_atlas_end(&atlas, nk_handle_id((int)device.font_tex), &device.null);
@ -343,7 +344,9 @@ static void nk_menu_context_destroy(void *data)
for (i = 0; i < NK_TEXTURE_LAST; i++)
video_driver_texture_unload((uintptr_t*)&nk->textures.list[i]);
#if 0
menu_display_font_main_deinit();
#endif
wimp_context_bg_destroy(nk);
}