src/video/windib/SDL_dibevents.c
changeset 421 195dd37b3d86
parent 327 13fc64213765
child 453 a6fa62b1be09
     1.1 --- a/src/video/windib/SDL_dibevents.c	Thu Jun 20 17:47:42 2002 +0000
     1.2 +++ b/src/video/windib/SDL_dibevents.c	Tue Jul 02 04:07:01 2002 +0000
     1.3 @@ -335,11 +335,18 @@
     1.4  {
     1.5  #ifdef _WIN32_WCE
     1.6  	/* WinCE uses the UNICODE version */
     1.7 -	int nLen = strlen(SDL_Appname)+1;
     1.8 -	LPWSTR lpszW = alloca(nLen*2);
     1.9 -	MultiByteToWideChar(CP_ACP, 0, SDL_Appname, -1, lpszW, nLen);
    1.10 +	int nLen;
    1.11 +	LPWSTR lpszW;
    1.12  
    1.13 -	SDL_RegisterApp("SDL_app", 0, 0);
    1.14 +	if ( SDL_RegisterApp("SDL_app", 0, 0) != 0 ) {
    1.15 +		return -1;
    1.16 +	}
    1.17 +
    1.18 +	nLen = strlen(SDL_Appname) + 1;
    1.19 +	lpszW = alloca(nLen * 2);
    1.20 +
    1.21 +	MultiByteToWideChar(CP_ACP, 0, "SDL_App", -1, lpszW, nLen);
    1.22 +
    1.23  	SDL_Window = CreateWindow(lpszW, lpszW, WS_VISIBLE,
    1.24                                    0, 0, 0, 0, NULL, NULL, SDL_Instance, NULL);
    1.25  	if ( SDL_Window == NULL ) {