Add BGM Preview Functionality

Some code adapted from Themely. Thanks to ErmanSayin
This commit is contained in:
2018-05-09 22:26:39 -04:00
parent cac2450fde
commit 05b56b1aa1
5 changed files with 192 additions and 3 deletions

View File

@@ -48,7 +48,9 @@ void printu(u16 *input)
ssize_t buf_len = in_len + 1; // Plus 1 for proper null termination
wchar_t *buf = calloc(buf_len, sizeof(wchar_t));
utf16_to_utf32((u32*)buf, input, buf_len);
printf("%ls\n", buf);
char cbuf[0x106];
sprintf(cbuf, "%ls\n", buf);
DEBUG(cbuf);
free(buf);
}