src/render/SDL_render.c
changeset 6497 e844e2632149
parent 6417 e54cc2d4e89a
child 6528 e978048ced60
--- a/src/render/SDL_render.c	Fri Sep 28 04:03:06 2012 -0700
+++ b/src/render/SDL_render.c	Fri Sep 28 04:09:06 2012 -0700
@@ -393,6 +393,13 @@
             return NULL;
         }
 
+        /* Swap textures to have texture before texture->native in the list */
+        texture->native->next = texture->next;
+        texture->prev = texture->native->prev;
+        texture->native->prev = texture;
+        texture->next = texture->native;
+        renderer->textures = texture;
+
         if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
             texture->yuv = SDL_SW_CreateYUVTexture(format, w, h);
             if (!texture->yuv) {