Mercurial > sdl-ios-xcode
changeset 504:8c4a35e3c507
Fixed SDL_main.c on Windows CE with applications containing spaces in their names.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 05 Oct 2002 05:42:56 +0000 |
parents | 2ee72e47ca08 |
children | 6b34c9dcf74c |
files | src/main/win32/SDL_main.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/win32/SDL_main.c Sat Oct 05 05:32:49 2002 +0000 +++ b/src/main/win32/SDL_main.c Sat Oct 05 05:42:56 2002 +0000 @@ -291,7 +291,9 @@ #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);