RPi: Patched to compile without OpenGL (thanks, Simon!), other cleanups.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 06 Jun 2015 22:45:22 -0400
changeset 97110a329b2a297f
parent 9710 38ca9a2dd2ef
child 9712 a964d651f1dd
RPi: Patched to compile without OpenGL (thanks, Simon!), other cleanups.

Fixes Bugzilla #3003.
src/video/raspberry/SDL_rpivideo.c
     1.1 --- a/src/video/raspberry/SDL_rpivideo.c	Fri Jun 05 19:41:34 2015 +0200
     1.2 +++ b/src/video/raspberry/SDL_rpivideo.c	Sat Jun 06 22:45:22 2015 -0400
     1.3 @@ -284,15 +284,14 @@
     1.4  void
     1.5  RPI_DestroyWindow(_THIS, SDL_Window * window)
     1.6  {
     1.7 -    SDL_WindowData *data;
     1.8 -        
     1.9 -    if(window->driverdata) {
    1.10 -        data = (SDL_WindowData *) window->driverdata;
    1.11 +    SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
    1.12 +    if(data) {
    1.13 +#if SDL_VIDEO_OPENGL_EGL
    1.14          if (data->egl_surface != EGL_NO_SURFACE) {
    1.15              SDL_EGL_DestroySurface(_this, data->egl_surface);
    1.16 -            data->egl_surface = EGL_NO_SURFACE;
    1.17          }
    1.18 -        SDL_free(window->driverdata);
    1.19 +#endif
    1.20 +        SDL_free(data);
    1.21          window->driverdata = NULL;
    1.22      }
    1.23  }