Fixed compiling without XRender enabled
authorSam Lantinga
Wed, 28 Jul 2010 01:14:48 -0700
changeset 4620f4a93bde905f
parent 4619 b9a205e6369f
child 4621 12a9cf73596a
Fixed compiling without XRender enabled
src/video/x11/SDL_x11render.c
     1.1 --- a/src/video/x11/SDL_x11render.c	Wed Jul 28 01:05:58 2010 -0700
     1.2 +++ b/src/video/x11/SDL_x11render.c	Wed Jul 28 01:14:48 2010 -0700
     1.3 @@ -1038,7 +1038,7 @@
     1.4  static int
     1.5  X11_SetTextureRGBAMod(SDL_Renderer * renderer, SDL_Texture * texture)
     1.6  {
     1.7 -
     1.8 +#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
     1.9      X11_TextureData *data = (X11_TextureData *) texture->driverdata;
    1.10      X11_RenderData *renderdata = (X11_RenderData *) renderer->driverdata;
    1.11  
    1.12 @@ -1094,11 +1094,14 @@
    1.13          }
    1.14  
    1.15          return 0;
    1.16 -    }
    1.17 -    else {
    1.18 +    } else {
    1.19          SDL_Unsupported();
    1.20          return -1;
    1.21      }
    1.22 +#else
    1.23 +    SDL_Unsupported();
    1.24 +    return -1;
    1.25 +#endif
    1.26  }
    1.27  
    1.28  static int
    1.29 @@ -1314,6 +1317,7 @@
    1.30          return SDL_MapRGBA(&data->format, r, g, b, a);
    1.31  }
    1.32  
    1.33 +#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
    1.34  static XRenderColor
    1.35  xrenderdrawcolor(SDL_Renderer *renderer)
    1.36  {
    1.37 @@ -1328,6 +1332,7 @@
    1.38      }
    1.39      return xrender_color;
    1.40  }
    1.41 +#endif
    1.42  
    1.43  static int
    1.44  X11_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points,