src/video/windib/SDL_dibevents.c
changeset 1288 ea3888b472bf
parent 1282 217f5d5a49e5
child 1303 52b5afd7ecee
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 }