parent
5b2e7aab30
commit
8a85084fc1
|
@ -284,15 +284,14 @@ RPI_CreateWindow(_THIS, SDL_Window * window)
|
||||||
void
|
void
|
||||||
RPI_DestroyWindow(_THIS, SDL_Window * window)
|
RPI_DestroyWindow(_THIS, SDL_Window * window)
|
||||||
{
|
{
|
||||||
SDL_WindowData *data;
|
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||||
|
if(data) {
|
||||||
if(window->driverdata) {
|
#if SDL_VIDEO_OPENGL_EGL
|
||||||
data = (SDL_WindowData *) window->driverdata;
|
|
||||||
if (data->egl_surface != EGL_NO_SURFACE) {
|
if (data->egl_surface != EGL_NO_SURFACE) {
|
||||||
SDL_EGL_DestroySurface(_this, data->egl_surface);
|
SDL_EGL_DestroySurface(_this, data->egl_surface);
|
||||||
data->egl_surface = EGL_NO_SURFACE;
|
|
||||||
}
|
}
|
||||||
SDL_free(window->driverdata);
|
#endif
|
||||||
|
SDL_free(data);
|
||||||
window->driverdata = NULL;
|
window->driverdata = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue