src/video/wincommon/SDL_wingl.c
changeset 1527 ce84e28c2c07
parent 1523 21b1fbb53f4a
child 1656 96c2f89cc7e1
child 1736 3b2a92126f4d
equal deleted inserted replaced
1526:89f90f32f6c0 1527:ce84e28c2c07
    36 /* If setting the HDC fails, we may need to recreate the window (MSDN) */
    36 /* If setting the HDC fails, we may need to recreate the window (MSDN) */
    37 static int WIN_GL_ResetWindow(_THIS)
    37 static int WIN_GL_ResetWindow(_THIS)
    38 {
    38 {
    39 	int status = 0;
    39 	int status = 0;
    40 
    40 
    41 #if 0 /* This doesn't work with DirectX code (see CVS comments) */
       
    42 #ifndef _WIN32_WCE /* FIXME WinCE needs the UNICODE version of CreateWindow() */
    41 #ifndef _WIN32_WCE /* FIXME WinCE needs the UNICODE version of CreateWindow() */
       
    42 	/* This doesn't work with DirectX code (see CVS comments) */
    43 	/* If we were passed a window, then we can't create a new one */
    43 	/* If we were passed a window, then we can't create a new one */
    44 	if ( !SDL_windowid ) {
    44 	if ( !SDL_windowid && SDL_strcmp(this->name, "windib") == 0 ) {
    45 		/* Save the existing window attributes */
    45 		/* Save the existing window attributes */
    46 		LONG style;
    46 		LONG style;
    47 		RECT rect = { 0, 0, 0, 0 };
    47 		RECT rect = { 0, 0, 0, 0 };
    48 		style = GetWindowLong(SDL_Window, GWL_STYLE);
    48 		style = GetWindowLong(SDL_Window, GWL_STYLE);
    49 		GetWindowRect(SDL_Window, &rect);
    49 		GetWindowRect(SDL_Window, &rect);
    64 			SDL_SetError("Couldn't create window");
    64 			SDL_SetError("Couldn't create window");
    65 			status = -1;
    65 			status = -1;
    66 		}
    66 		}
    67 	} else
    67 	} else
    68 #endif /* !_WIN32_WCE */
    68 #endif /* !_WIN32_WCE */
    69 #endif
       
    70 	{
    69 	{
    71 		SDL_SetError("Unable to reset window for OpenGL context");
    70 		SDL_SetError("Unable to reset window for OpenGL context");
    72 		status = -1;
    71 		status = -1;
    73 	}
    72 	}
    74 	return(status);
    73 	return(status);