mirror of
https://github.com/yawut/SDL.git
synced 2026-08-23 01:05:09 -05:00
Fixed SDL_main.c on Windows CE with applications containing spaces in their names.
This commit is contained in:
@@ -291,7 +291,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
|
||||
#ifdef _WIN32_WCE
|
||||
nLen = wcslen(szCmdLine)+128+1;
|
||||
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));
|
||||
nLen = wcslen(bufp)+1;
|
||||
cmdline = (char *)alloca(nLen);
|
||||
|
||||
Reference in New Issue
Block a user