comparison src/video/x11/SDL_x11render.c @ 4620:f4a93bde905f

Fixed compiling without XRender enabled
author Sam Lantinga <slouken@libsdl.org>
date Wed, 28 Jul 2010 01:14:48 -0700
parents b9a205e6369f
children 453712fd2016
comparison
equal deleted inserted replaced
4619:b9a205e6369f 4620:f4a93bde905f
1036 } 1036 }
1037 1037
1038 static int 1038 static int
1039 X11_SetTextureRGBAMod(SDL_Renderer * renderer, SDL_Texture * texture) 1039 X11_SetTextureRGBAMod(SDL_Renderer * renderer, SDL_Texture * texture)
1040 { 1040 {
1041 1041 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
1042 X11_TextureData *data = (X11_TextureData *) texture->driverdata; 1042 X11_TextureData *data = (X11_TextureData *) texture->driverdata;
1043 X11_RenderData *renderdata = (X11_RenderData *) renderer->driverdata; 1043 X11_RenderData *renderdata = (X11_RenderData *) renderer->driverdata;
1044 1044
1045 if (renderdata->use_xrender) { 1045 if (renderdata->use_xrender) {
1046 1046
1092 XRenderChangePicture(renderdata->display, renderdata->brush_pict, 1092 XRenderChangePicture(renderdata->display, renderdata->brush_pict,
1093 CPComponentAlpha, &attr); 1093 CPComponentAlpha, &attr);
1094 } 1094 }
1095 1095
1096 return 0; 1096 return 0;
1097 } 1097 } else {
1098 else {
1099 SDL_Unsupported(); 1098 SDL_Unsupported();
1100 return -1; 1099 return -1;
1101 } 1100 }
1101 #else
1102 SDL_Unsupported();
1103 return -1;
1104 #endif
1102 } 1105 }
1103 1106
1104 static int 1107 static int
1105 X11_SetTextureBlendMode(SDL_Renderer * renderer, SDL_Texture * texture) 1108 X11_SetTextureBlendMode(SDL_Renderer * renderer, SDL_Texture * texture)
1106 { 1109 {
1312 ((int) b * (int) a) / 255, 255); 1315 ((int) b * (int) a) / 255, 255);
1313 else 1316 else
1314 return SDL_MapRGBA(&data->format, r, g, b, a); 1317 return SDL_MapRGBA(&data->format, r, g, b, a);
1315 } 1318 }
1316 1319
1320 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
1317 static XRenderColor 1321 static XRenderColor
1318 xrenderdrawcolor(SDL_Renderer *renderer) 1322 xrenderdrawcolor(SDL_Renderer *renderer)
1319 { 1323 {
1320 XRenderColor xrender_color; 1324 XRenderColor xrender_color;
1321 if(renderer->blendMode == SDL_BLENDMODE_NONE) { 1325 if(renderer->blendMode == SDL_BLENDMODE_NONE) {
1326 xrender_color = 1330 xrender_color =
1327 SDLColorToXRenderColor(renderer->r, renderer->g, renderer->b, renderer->a); 1331 SDLColorToXRenderColor(renderer->r, renderer->g, renderer->b, renderer->a);
1328 } 1332 }
1329 return xrender_color; 1333 return xrender_color;
1330 } 1334 }
1335 #endif
1331 1336
1332 static int 1337 static int
1333 X11_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points, 1338 X11_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points,
1334 int count) 1339 int count)
1335 { 1340 {