src/video/wincommon/SDL_sysevents.c
changeset 1505 4d005dfbb7f5
parent 1498 3968f7cba10c
child 1523 21b1fbb53f4a
equal deleted inserted replaced
1504:7b4b31075f67 1505:4d005dfbb7f5
   760 	}
   760 	}
   761 
   761 
   762 	if ( name ) {
   762 	if ( name ) {
   763 #ifdef _WIN32_WCE
   763 #ifdef _WIN32_WCE
   764 		/* WinCE uses the UNICODE version */
   764 		/* WinCE uses the UNICODE version */
   765 		size_t nLen = SDL_strlen(name)+1;
   765 		SDL_Appname = SDL_iconv_utf8_ucs2(name);
   766 		SDL_Appname = SDL_malloc(nLen*2);
       
   767 		MultiByteToWideChar(CP_ACP, 0, name, -1, SDL_Appname, nLen);
       
   768 #else
   766 #else
   769 		size_t nLen = SDL_strlen(name)+1;
   767 		SDL_Appname = SDL_iconv_utf8_latin1(name);
   770 		SDL_Appname = SDL_malloc(nLen);
       
   771 		SDL_strlcpy(SDL_Appname, name, nLen);
       
   772 #endif /* _WIN32_WCE */
   768 #endif /* _WIN32_WCE */
   773 		SDL_Appstyle = style;
   769 		SDL_Appstyle = style;
   774 		SDL_Instance = hInst ? hInst : SDL_GetModuleHandle();
   770 		SDL_Instance = hInst ? hInst : SDL_GetModuleHandle();
   775 	}
   771 	}
   776 
   772