src/main/win32/SDL_main.c
changeset 504 8c4a35e3c507
parent 453 a6fa62b1be09
child 505 6b34c9dcf74c
equal deleted inserted replaced
503:2ee72e47ca08 504:8c4a35e3c507
   289 #endif /* !NO_STDIO_REDIRECT */
   289 #endif /* !NO_STDIO_REDIRECT */
   290 
   290 
   291 #ifdef _WIN32_WCE
   291 #ifdef _WIN32_WCE
   292 	nLen = wcslen(szCmdLine)+128+1;
   292 	nLen = wcslen(szCmdLine)+128+1;
   293 	bufp = (wchar_t *)alloca(nLen*2);
   293 	bufp = (wchar_t *)alloca(nLen*2);
   294 	GetModuleFileName(NULL, bufp, 128);
   294 	wcscpy (bufp, "\"");
       
   295 	GetModuleFileName(NULL, bufp+1, 128-3);
       
   296 	wcscpy (bufp+wcslen(bufp), "\" ");
   295 	wcsncpy(bufp+wcslen(bufp), szCmdLine,nLen-wcslen(bufp));
   297 	wcsncpy(bufp+wcslen(bufp), szCmdLine,nLen-wcslen(bufp));
   296 	nLen = wcslen(bufp)+1;
   298 	nLen = wcslen(bufp)+1;
   297 	cmdline = (char *)alloca(nLen);
   299 	cmdline = (char *)alloca(nLen);
   298 	if ( cmdline == NULL ) {
   300 	if ( cmdline == NULL ) {
   299 		return OutOfMemory();
   301 		return OutOfMemory();