Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11opengles.c @ 3218:81773a1eac83
Patch from David Carre:
I fixed a bug in the "SDL_DestroyRenderer()" function in the pandora x11 renderer (in fact the bug was in the "X11_GLES_MakeCurrent()" function) that was causing a crash when exiting SDL.
There was a problem while terminating the x11 egl window, that was preventing to quit/close SDL/SDL-window then reload SDL/SDL-window inside the same application.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 30 Jul 2009 14:53:57 +0000 |
parents | c68d2ca5970f |
children | d559edc85610 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11opengles.c Sun Jul 19 08:04:59 2009 +0000 +++ b/src/video/x11/SDL_x11opengles.c Thu Jul 30 14:53:57 2009 +0000 @@ -298,8 +298,8 @@ { int retval; - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - Display *display = data->videodata->display; +// SDL_WindowData *data = (SDL_WindowData *) window->driverdata; +// Display *display = data->videodata->display; retval = 1; if (!_this->gles_data->eglMakeCurrent(_this->gles_data->egl_display, @@ -309,7 +309,7 @@ SDL_SetError("Unable to make EGL context current"); retval = -1; } - XSync(display, False); +// XSync(display, False); return (retval); } @@ -359,6 +359,10 @@ } } _this->gles_data->egl_active = 0; + +/* crappy fix */ + X11_GLES_UnloadLibrary(_this); + } #endif /* SDL_VIDEO_OPENGL_ES */