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

Commit

Permalink
Fixed trying to create an XRender texture for YUV formats
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 2, 2011
1 parent 52d3c1d commit ffc631b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/video/x11/SDL_x11render.c
Expand Up @@ -1010,8 +1010,7 @@ X11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
return -1;
}
}
}
else {
} else {
data->image =
XCreateImage(renderdata->display, data->visual,
data->depth, ZPixmap, 0, NULL,
Expand All @@ -1036,7 +1035,7 @@ X11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
data->pitch = data->image->bytes_per_line;

#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
if(renderdata->use_xrender) {
if(renderdata->use_xrender && !data->yuv) {
gcv.graphics_exposures = False;
data->gc =
XCreateGC(renderdata->display, data->pixmap, GCGraphicsExposures, &gcv);
Expand Down Expand Up @@ -1922,7 +1921,7 @@ X11_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
SDL_AddDirtyRect(&data->dirty, dstrect);
}
#ifdef SDL_VIDEO_DRIVER_X11_XRENDER
if (data->use_xrender) {
if (data->use_xrender && !texturedata->yuv) {
if(texture->access == SDL_TEXTUREACCESS_STREAMING) {
#ifndef NO_SHARED_MEMORY
if(texturedata->shminfo.shmaddr) {
Expand Down

0 comments on commit ffc631b

Please sign in to comment.