Skip to content
Permalink
Browse files
Fixed bug #139
The text in SDL_WM_SetCaption() is in UTF-8 encoding.
  • Loading branch information
slouken committed Mar 13, 2006
1 parent 9120aff commit 844c38838501d727259ec0c8600c1e99cfc26b67

File 2 of 4 in 844c388

@@ -762,13 +762,9 @@ int SDL_RegisterApp(char *name, Uint32 style, void *hInst)
if ( name ) {
#ifdef _WIN32_WCE
/* WinCE uses the UNICODE version */
size_t nLen = SDL_strlen(name)+1;
SDL_Appname = SDL_malloc(nLen*2);
MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen);
SDL_Appname = SDL_iconv_utf8_ucs2(name);
#else
size_t nLen = SDL_strlen(name)+1;
SDL_Appname = SDL_malloc(nLen);
SDL_strlcpy(SDL_Appname, name, nLen);
SDL_Appname = SDL_iconv_utf8_latin1(name);
#endif /* _WIN32_WCE */
SDL_Appstyle = style;
SDL_Instance = hInst ? hInst : SDL_GetModuleHandle();

0 comments on commit 844c388

Please sign in to comment.