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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403715
This commit is contained in:
Sam Lantinga 2009-07-30 14:53:57 +00:00
parent 01700524c1
commit 8a68fef797
4 changed files with 36 additions and 7 deletions

View file

@ -298,8 +298,8 @@ X11_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{
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 @@ X11_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
SDL_SetError("Unable to make EGL context current");
retval = -1;
}
XSync(display, False);
// XSync(display, False);
return (retval);
}
@ -359,6 +359,10 @@ X11_GLES_DeleteContext(_THIS, SDL_GLContext context)
}
}
_this->gles_data->egl_active = 0;
/* crappy fix */
X11_GLES_UnloadLibrary(_this);
}
#endif /* SDL_VIDEO_OPENGL_ES */