Whoops, it's not quite that easy - fixed bug in SDL_ClearDirtyRects()
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402586
This commit is contained in:
parent
1c3727d1db
commit
60cc07ddbf
1 changed files with 14 additions and 1 deletions
|
@ -149,7 +149,20 @@ SDL_AddDirtyRect(SDL_DirtyRectList * list, const SDL_Rect * rect)
|
|||
void
|
||||
SDL_ClearDirtyRects(SDL_DirtyRectList * list)
|
||||
{
|
||||
list->free = list->list;
|
||||
SDL_DirtyRect *prev, *curr;
|
||||
|
||||
/* Skip to the end of the free list */
|
||||
prev = NULL;
|
||||
for (curr = list->free; curr; curr = curr->next) {
|
||||
prev = curr;
|
||||
}
|
||||
|
||||
/* Add the list entries to the end */
|
||||
if (prev) {
|
||||
prev->next = list->list;
|
||||
} else {
|
||||
list->free = list->list;
|
||||
}
|
||||
list->list = NULL;
|
||||
list->count = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue