Mercurial > sdl-ios-xcode
comparison src/video/windib/SDL_dibevents.c @ 1288:ea3888b472bf
Cleaned up the app registration stuff a bit
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 29 Jan 2006 09:13:36 +0000 |
parents | 217f5d5a49e5 |
children | 52b5afd7ecee |
comparison
equal
deleted
inserted
replaced
1287:15a89a0c52bf | 1288:ea3888b472bf |
---|---|
404 | 404 |
405 int DIB_CreateWindow(_THIS) | 405 int DIB_CreateWindow(_THIS) |
406 { | 406 { |
407 char *windowid = getenv("SDL_WINDOWID"); | 407 char *windowid = getenv("SDL_WINDOWID"); |
408 | 408 |
409 #ifndef CS_BYTEALIGNCLIENT | 409 SDL_RegisterApp(NULL, 0, 0); |
410 #define CS_BYTEALIGNCLIENT 0 | |
411 #endif | |
412 SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0); | |
413 | 410 |
414 SDL_windowid = (windowid != NULL); | 411 SDL_windowid = (windowid != NULL); |
415 if ( SDL_windowid ) { | 412 if ( SDL_windowid ) { |
416 #if defined(_WIN32_WCE) && (_WIN32_WCE < 300) | 413 #if defined(_WIN32_WCE) && (_WIN32_WCE < 300) |
417 /* wince 2.1 does not have strtol */ | 414 /* wince 2.1 does not have strtol */ |
450 if ( SDL_windowid ) { | 447 if ( SDL_windowid ) { |
451 SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)userWindowProc); | 448 SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)userWindowProc); |
452 } else { | 449 } else { |
453 DestroyWindow(SDL_Window); | 450 DestroyWindow(SDL_Window); |
454 } | 451 } |
455 } | 452 SDL_UnregisterApp(); |
453 } |