mirror of
https://github.com/yawut/SDL.git
synced 2026-06-13 04:00:50 -05:00
Fixed texture list when swapping textures (thanks Drake Wilson!)
This commit is contained in:
parent
873ecde0ad
commit
04275d9bfb
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user