comparison src/video/windx5/SDL_dx5events.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 f61f045343d3
children 52b5afd7ecee
comparison
equal deleted inserted replaced
1287:15a89a0c52bf 1288:ea3888b472bf
856 SDL_DIdev[i] = NULL; 856 SDL_DIdev[i] = NULL;
857 SDL_DIevt[i] = NULL; 857 SDL_DIevt[i] = NULL;
858 SDL_DIfun[i] = NULL; 858 SDL_DIfun[i] = NULL;
859 } 859 }
860 860
861 #ifndef CS_BYTEALIGNCLIENT 861 SDL_RegisterApp(NULL, 0, 0);
862 #define CS_BYTEALIGNCLIENT 0
863 #endif
864 SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0);
865 862
866 SDL_windowid = (windowid != NULL); 863 SDL_windowid = (windowid != NULL);
867 if ( SDL_windowid ) { 864 if ( SDL_windowid ) {
868 SDL_Window = (HWND)strtol(windowid, NULL, 0); 865 SDL_Window = (HWND)strtol(windowid, NULL, 0);
869 if ( SDL_Window == NULL ) { 866 if ( SDL_Window == NULL ) {
905 if ( SDL_windowid ) { 902 if ( SDL_windowid ) {
906 SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)userWindowProc); 903 SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)userWindowProc);
907 } else { 904 } else {
908 DestroyWindow(SDL_Window); 905 DestroyWindow(SDL_Window);
909 } 906 }
910 } 907 SDL_UnregisterApp();
908 }