src/render/direct3d/SDL_render_d3d.c
changeset 10183 17e0ded12e6f
parent 9998 f67cf37e9cd4
child 10408 d78b187845d6
equal deleted inserted replaced
10182:4980c48b8dbe 10183:17e0ded12e6f
  1002 D3D_RecreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
  1002 D3D_RecreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
  1003 {
  1003 {
  1004     D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
  1004     D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
  1005     D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
  1005     D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
  1006 
  1006 
       
  1007     if (!texturedata) {
       
  1008         return 0;
       
  1009     }
       
  1010 
  1007     if (D3D_RecreateTextureRep(data->device, &texturedata->texture, texture->format, texture->w, texture->h) < 0) {
  1011     if (D3D_RecreateTextureRep(data->device, &texturedata->texture, texture->format, texture->w, texture->h) < 0) {
  1008         return -1;
  1012         return -1;
  1009     }
  1013     }
  1010 
  1014 
  1011     if (texturedata->yuv) {
  1015     if (texturedata->yuv) {