src/render/SDL_render.c
changeset 6497 e844e2632149
parent 6417 e54cc2d4e89a
child 6528 e978048ced60
equal deleted inserted replaced
6496:d7cb947898d7 6497:e844e2632149
   391         if (!texture->native) {
   391         if (!texture->native) {
   392             SDL_DestroyTexture(texture);
   392             SDL_DestroyTexture(texture);
   393             return NULL;
   393             return NULL;
   394         }
   394         }
   395 
   395 
       
   396         /* Swap textures to have texture before texture->native in the list */
       
   397         texture->native->next = texture->next;
       
   398         texture->prev = texture->native->prev;
       
   399         texture->native->prev = texture;
       
   400         texture->next = texture->native;
       
   401         renderer->textures = texture;
       
   402 
   396         if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
   403         if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
   397             texture->yuv = SDL_SW_CreateYUVTexture(format, w, h);
   404             texture->yuv = SDL_SW_CreateYUVTexture(format, w, h);
   398             if (!texture->yuv) {
   405             if (!texture->yuv) {
   399                 SDL_DestroyTexture(texture);
   406                 SDL_DestroyTexture(texture);
   400                 return NULL;
   407                 return NULL;