Mercurial > sdl-ios-xcode
comparison src/video/windib/SDL_dibevents.c @ 453:a6fa62b1be09
Updated for embedded Visual C++ 4.0
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 20 Aug 2002 00:20:06 +0000 |
parents | 195dd37b3d86 |
children | 1080bfc4aa96 |
comparison
equal
deleted
inserted
replaced
452:4c5c10383201 | 453:a6fa62b1be09 |
---|---|
331 return(keysym); | 331 return(keysym); |
332 } | 332 } |
333 | 333 |
334 int DIB_CreateWindow(_THIS) | 334 int DIB_CreateWindow(_THIS) |
335 { | 335 { |
336 #ifdef _WIN32_WCE | 336 #ifndef CS_BYTEALIGNCLIENT |
337 /* WinCE uses the UNICODE version */ | 337 #define CS_BYTEALIGNCLIENT 0 |
338 int nLen; | 338 #endif |
339 LPWSTR lpszW; | |
340 | |
341 if ( SDL_RegisterApp("SDL_app", 0, 0) != 0 ) { | |
342 return -1; | |
343 } | |
344 | |
345 nLen = strlen(SDL_Appname) + 1; | |
346 lpszW = alloca(nLen * 2); | |
347 | |
348 MultiByteToWideChar(CP_ACP, 0, "SDL_App", -1, lpszW, nLen); | |
349 | |
350 SDL_Window = CreateWindow(lpszW, lpszW, WS_VISIBLE, | |
351 0, 0, 0, 0, NULL, NULL, SDL_Instance, NULL); | |
352 if ( SDL_Window == NULL ) { | |
353 SDL_SetError("Couldn't create window"); | |
354 return(-1); | |
355 } | |
356 ShowWindow(SDL_Window, SW_HIDE); | |
357 #else | |
358 SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0); | 339 SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0); |
359 if ( SDL_windowid ) { | 340 if ( SDL_windowid ) { |
360 SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0); | 341 SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0); |
361 | 342 |
362 /* DJM: we want all event's for the user specified | 343 /* DJM: we want all event's for the user specified |
374 SDL_SetError("Couldn't create window"); | 355 SDL_SetError("Couldn't create window"); |
375 return(-1); | 356 return(-1); |
376 } | 357 } |
377 ShowWindow(SDL_Window, SW_HIDE); | 358 ShowWindow(SDL_Window, SW_HIDE); |
378 } | 359 } |
379 #endif /* _WIN32_WCE */ | |
380 | |
381 return(0); | 360 return(0); |
382 } | 361 } |
383 | 362 |
384 void DIB_DestroyWindow(_THIS) | 363 void DIB_DestroyWindow(_THIS) |
385 { | 364 { |