Commit 605e7e00 authored by Sam Lantinga's avatar Sam Lantinga

Fixed SDL_main.c on Windows CE with applications containing spaces in their names.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40505
parent f4d9f8e5
...@@ -291,7 +291,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) ...@@ -291,7 +291,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
nLen = wcslen(szCmdLine)+128+1; nLen = wcslen(szCmdLine)+128+1;
bufp = (wchar_t *)alloca(nLen*2); bufp = (wchar_t *)alloca(nLen*2);
GetModuleFileName(NULL, bufp, 128); wcscpy (bufp, "\"");
GetModuleFileName(NULL, bufp+1, 128-3);
wcscpy (bufp+wcslen(bufp), "\" ");
wcsncpy(bufp+wcslen(bufp), szCmdLine,nLen-wcslen(bufp)); wcsncpy(bufp+wcslen(bufp), szCmdLine,nLen-wcslen(bufp));
nLen = wcslen(bufp)+1; nLen = wcslen(bufp)+1;
cmdline = (char *)alloca(nLen); cmdline = (char *)alloca(nLen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment