comparison src/video/x11/SDL_x11render.c @ 4574:bfb4933c0efa

Fix initial value of the xrender_available boolean in X11_CreateTexture.
author Sunny Sachanandani <sunnysachanandani@gmail.com>
date Fri, 28 May 2010 20:47:24 +0530
parents 6399178be313
children 037ddbeee6c3
comparison
equal deleted inserted replaced
4573:6399178be313 4574:bfb4933c0efa
395 SDL_Window *window = renderer->window; 395 SDL_Window *window = renderer->window;
396 SDL_VideoDisplay *display = window->display; 396 SDL_VideoDisplay *display = window->display;
397 X11_TextureData *data; 397 X11_TextureData *data;
398 int pitch_alignmask = ((renderdata->scanline_pad / 8) - 1); 398 int pitch_alignmask = ((renderdata->scanline_pad / 8) - 1);
399 399
400
401 data = (X11_TextureData *) SDL_calloc(1, sizeof(*data)); 400 data = (X11_TextureData *) SDL_calloc(1, sizeof(*data));
402 if (!data) { 401 if (!data) {
403 SDL_OutOfMemory(); 402 SDL_OutOfMemory();
404 return -1; 403 return -1;
405 } 404 }
416 /* If Xrender support is builtin we only need to check whether 415 /* If Xrender support is builtin we only need to check whether
417 Xrender is available at runtime. If it is available there 416 Xrender is available at runtime. If it is available there
418 can be no BadMatch error since Xrender takes care of that. 417 can be no BadMatch error since Xrender takes care of that.
419 */ 418 */
420 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER 419 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
420 // Assume the texture is supported by Xrender
421 data->xrender_available = TRUE
421 if(renderdata->xrender_available == SDL_False) { 422 if(renderdata->xrender_available == SDL_False) {
422 if (texture->format != display->current_mode.format) { 423 if (texture->format != display->current_mode.format) {
423 SDL_SetError("Texture format doesn't match window format"); 424 SDL_SetError("Texture format doesn't match window format");
424 return -1; 425 return -1;
425 } 426 }