comparison src/video/SDL_video.c @ 423:d1565c52ded5

More correct error reported when calling SDL_GL_LoadLibrary() without prior call to SDL_Init().
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 10 Jul 2002 05:18:09 +0000
parents db0cc6034336
children 60effdbf14ee
comparison
equal deleted inserted replaced
422:b1b9ee41be70 423:d1565c52ded5
1297 SDL_VideoDevice *video = current_video; 1297 SDL_VideoDevice *video = current_video;
1298 SDL_VideoDevice *this = current_video; 1298 SDL_VideoDevice *this = current_video;
1299 int retval; 1299 int retval;
1300 1300
1301 retval = -1; 1301 retval = -1;
1302 if ( video && video->GL_LoadLibrary ) { 1302 if ( video == NULL ) {
1303 retval = video->GL_LoadLibrary(this, path); 1303 SDL_SetError("Video subsystem has not been initialized");
1304 } else { 1304 } else {
1305 SDL_SetError("No dynamic GL support in video driver"); 1305 if ( video->GL_LoadLibrary ) {
1306 retval = video->GL_LoadLibrary(this, path);
1307 } else {
1308 SDL_SetError("No dynamic GL support in video driver");
1309 }
1306 } 1310 }
1307 return(retval); 1311 return(retval);
1308 } 1312 }
1309 1313
1310 void *SDL_GL_GetProcAddress(const char* proc) 1314 void *SDL_GL_GetProcAddress(const char* proc)