diff nuklear_ui/font_android.c @ 1843:13abdc98379e mame_interp

Get Android build target working on mame_interp branch
author Michael Pavone <pavone@retrodev.com>
date Thu, 18 Apr 2019 22:06:47 -0700
parents 78abbabfd58d
children
line wrap: on
line diff
--- a/nuklear_ui/font_android.c	Sun Apr 14 23:38:02 2019 -0700
+++ b/nuklear_ui/font_android.c	Thu Apr 18 22:06:47 2019 -0700
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
+#include <string.h>
 #include "../util.h"
 #include "../paths.h"
 #include "sfnt.h"
@@ -186,9 +187,9 @@
 	}
 error:
 	//try some likely suspects if we failed to parse fonts.xml or failed to find the indicated font
-	ret = try_load_font("/system/fonts/Roboto-Regular.ttf", size_out);
+	ret = try_load_font(strdup("/system/fonts/Roboto-Regular.ttf"), size_out);
 	if (!ret) {
-		ret = try_load_font("/system/fonts/DroidSans.ttf", size_out);
+		ret = try_load_font(strdup("/system/fonts/DroidSans.ttf"), size_out);
 	}
 	return ret;
 }