mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
Fixed building with mingw32
This commit is contained in:
parent
3e1679c885
commit
5cb1ca551f
3 changed files with 59 additions and 4 deletions
|
@ -1628,6 +1628,16 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt,
|
|||
len = SDL_PrintFloat(text, left, &info, va_arg(ap, double));
|
||||
done = SDL_TRUE;
|
||||
break;
|
||||
case 'S':
|
||||
{
|
||||
/* In practice this is used on Windows for WCHAR strings */
|
||||
wchar_t *wide_arg = va_arg(ap, wchar_t *);
|
||||
char *arg = SDL_iconv_string("UTF-8", "UTF-16LE", (char *)(wide_arg), (SDL_wcslen(wide_arg)+1)*sizeof(*wide_arg));
|
||||
len = SDL_PrintString(text, left, &info, arg);
|
||||
SDL_free(arg);
|
||||
done = SDL_TRUE;
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
len = SDL_PrintString(text, left, &info, va_arg(ap, char *));
|
||||
done = SDL_TRUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue