Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix initial value of the xrender_available boolean in X11_CreateTexture.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyps committed May 28, 2010
1 parent f3d4dc9 commit d4d53a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/x11/SDL_x11render.c
Expand Up @@ -397,7 +397,6 @@ X11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
X11_TextureData *data;
int pitch_alignmask = ((renderdata->scanline_pad / 8) - 1);


data = (X11_TextureData *) SDL_calloc(1, sizeof(*data));
if (!data) {
SDL_OutOfMemory();
Expand All @@ -418,6 +417,8 @@ X11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
can be no BadMatch error since Xrender takes care of that.
*/
#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
// Assume the texture is supported by Xrender
data->xrender_available = TRUE
if(renderdata->xrender_available == SDL_False) {
if (texture->format != display->current_mode.format) {
SDL_SetError("Texture format doesn't match window format");
Expand Down

0 comments on commit d4d53a4

Please sign in to comment.