SDL GL unload

hi`

am I missing something or shouldn’t the below two blocks be swapped?

src/video/x11/SDL_x11gl.c: line 271

handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
if ( handle == NULL ) {
SDL_SetError(“Could not load OpenGL library”);
return -1;
}

/* Unload the old driver and reset the pointers */
X11_GL_UnloadLibrary(this);–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right

hi`

am I missing something or shouldn’t the below two blocks be swapped?

Nope.

The code only unloads the previous library if opening the new one succeeds.

Clipper ships rock. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

hi`

am I missing something or shouldn’t the below two blocks be swapped?

Nope.

The code only unloads the previous library if opening the new one succeeds.

Ah, I thought the purpose of unloading would be that I could change the
lib at runtime of the app and then have an app that forces a reload.
Well, this isn’t possible right now as the dlopen increases the
reference count and dlclose decrease it again then - nothing changes ;)–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right

Daniel Vogel wrote:

Sam Lantinga wrote:

hi`

am I missing something or shouldn’t the below two blocks be swapped?

Nope.

The code only unloads the previous library if opening the new one succeeds.

Ah, I thought the purpose of unloading would be that I could change the
lib at runtime of the app and then have an app that forces a reload.
Well, this isn’t possible right now as the dlopen increases the
reference count and dlclose decrease it again then - nothing changes :wink:

Well, okay, it is possible if I force an unload before… think, Daniel,
think ;)–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right