Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed texture list when swapping textures (thanks Drake Wilson!)

  • Loading branch information
slouken committed Oct 2, 2012
1 parent dc135a5 commit 8be134151aba5713a96c68291b00c6fa74d92798
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/render/SDL_render.c
@@ -418,7 +418,13 @@ SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int

/* Swap textures to have texture before texture->native in the list */
texture->native->next = texture->next;
if (texture->native->next) {
texture->native->next->prev = texture->native;
}
texture->prev = texture->native->prev;
if (texture->prev) {
texture->prev->next = texture;
}
texture->native->prev = texture;
texture->next = texture->native;
renderer->textures = texture;

0 comments on commit 8be1341

Please sign in to comment.