comparison src/video/ataricommon/SDL_atarigl.c @ 1239:cbdb2c156aca

Rollback
author Patrice Mandin <patmandin@gmail.com>
date Sun, 08 Jan 2006 17:29:19 +0000
parents 1901fea5edac
children 3692456e7b0f
comparison
equal deleted inserted replaced
1238:1901fea5edac 1239:cbdb2c156aca
132 if (gl_active) { 132 if (gl_active) {
133 SDL_SetError("OpenGL context already created"); 133 SDL_SetError("OpenGL context already created");
134 return -1; 134 return -1;
135 } 135 }
136 136
137 /* Driver already loaded ? */ 137 /* Unload previous driver */
138 if (this->gl_config.driver_loaded) { 138 SDL_AtariGL_UnloadLibrary(this);
139 /* Default path ? don't change anything */
140 if (path==NULL) {
141 return 0;
142 }
143 /* Unload previous driver */
144 SDL_AtariGL_UnloadLibrary(this);
145 }
146 139
147 /* Load library given by path */ 140 /* Load library given by path */
148 handle = NULL 141 handle = SDL_LoadObject(path);
149 if (path != NULL) {
150 handle = SDL_LoadObject(path);
151 }
152 if (handle == NULL) { 142 if (handle == NULL) {
153 /* Try to load another one */ 143 /* Try to load another one */
154 path = getenv("SDL_VIDEO_GL_DRIVER"); 144 path = getenv("SDL_VIDEO_GL_DRIVER");
155 if ( path != NULL ) { 145 if ( path != NULL ) {
156 handle = SDL_LoadObject(path); 146 handle = SDL_LoadObject(path);
406 { 396 {
407 #if defined(HAVE_OPENGL) 397 #if defined(HAVE_OPENGL)
408 if (this->gl_config.dll_handle) { 398 if (this->gl_config.dll_handle) {
409 SDL_UnloadObject(this->gl_config.dll_handle); 399 SDL_UnloadObject(this->gl_config.dll_handle);
410 this->gl_config.dll_handle = NULL; 400 this->gl_config.dll_handle = NULL;
411 this->gl_config.driver_loaded = 0;
412 401
413 /* Restore pointers to static library */ 402 /* Restore pointers to static library */
414 SDL_AtariGL_InitPointers(this); 403 SDL_AtariGL_InitPointers(this);
415 } 404 }
416 #endif 405 #endif