comparison src/video/windib/SDL_dibevents.c @ 36:13ee9f4834ea

Windows CE patches contributed by Rainer Loritz
author Sam Lantinga <slouken@lokigames.com>
date Wed, 23 May 2001 23:35:10 +0000
parents 74212992fb08
children 9ef74357a5fb
comparison
equal deleted inserted replaced
35:d3bc792e136d 36:13ee9f4834ea
301 301
302 int DIB_CreateWindow(_THIS) 302 int DIB_CreateWindow(_THIS)
303 { 303 {
304 #ifdef _WIN32_WCE 304 #ifdef _WIN32_WCE
305 /* WinCE uses the UNICODE version */ 305 /* WinCE uses the UNICODE version */
306 int nLen = strlen(SDL_Appname); 306 int nLen = strlen(SDL_Appname)+1;
307 LPWSTR lpszW = alloca((nLen+1)*2); 307 LPWSTR lpszW = alloca(nLen*2);
308 MultiByteToWideChar(CP_ACP, 0, SDL_Appname, -1, lpszW, nLen); 308 MultiByteToWideChar(CP_ACP, 0, SDL_Appname, -1, lpszW, nLen);
309 309
310 SDL_RegisterApp("SDL_app", 0, 0); 310 SDL_RegisterApp("SDL_app", 0, 0);
311 SDL_Window = CreateWindow(lpszW, lpszW, 311 SDL_Window = CreateWindow(lpszW, lpszW, WS_VISIBLE,
312 (WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX), 312 0, 0, 0, 0, NULL, NULL, SDL_Instance, NULL);
313 0, 0, 0, 0, NULL, NULL, SDL_Instance, NULL);
314 if ( SDL_Window == NULL ) { 313 if ( SDL_Window == NULL ) {
315 SDL_SetError("Couldn't create window"); 314 SDL_SetError("Couldn't create window");
316 return(-1); 315 return(-1);
317 } 316 }
318 ShowWindow(SDL_Window, SW_HIDE); 317 ShowWindow(SDL_Window, SW_HIDE);