comparison src/video/wincommon/SDL_syswm.c @ 438:f9c5f135a8b9

Added a way to get the Windows OpenGL context in SDL_syswm.h
author Sam Lantinga <slouken@libsdl.org>
date Sat, 17 Aug 2002 17:49:27 +0000
parents e8157fcb3114
children 3ac8344e3872
comparison
equal deleted inserted replaced
437:5602f069ccb2 438:f9c5f135a8b9
265 */ 265 */
266 int WIN_GetWMInfo(_THIS, SDL_SysWMinfo *info) 266 int WIN_GetWMInfo(_THIS, SDL_SysWMinfo *info)
267 { 267 {
268 if ( info->version.major <= SDL_MAJOR_VERSION ) { 268 if ( info->version.major <= SDL_MAJOR_VERSION ) {
269 info->window = SDL_Window; 269 info->window = SDL_Window;
270 if ( SDL_VERSIONNUM(info->version.major,
271 info->version.minor,
272 info->version.patch) >=
273 SDL_VERSION(1, 2, 5) ) {
274 #ifdef HAVE_OPENGL
275 info->hglrc = GL_hrc;
276 #else
277 info->hglrc = NULL;
278 #endif
279 }
270 return(1); 280 return(1);
271 } else { 281 } else {
272 SDL_SetError("Application not compiled with SDL %d.%d\n", 282 SDL_SetError("Application not compiled with SDL %d.%d\n",
273 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); 283 SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
274 return(-1); 284 return(-1);