src/video/SDL_rect.c
changeset 2224 29cc9e9c76bd
parent 2223 175754591a13
child 2275 12ea0fdc0df2
equal deleted inserted replaced
2223:175754591a13 2224:29cc9e9c76bd
   147 }
   147 }
   148 
   148 
   149 void
   149 void
   150 SDL_ClearDirtyRects(SDL_DirtyRectList * list)
   150 SDL_ClearDirtyRects(SDL_DirtyRectList * list)
   151 {
   151 {
   152     list->free = list->list;
   152     SDL_DirtyRect *prev, *curr;
       
   153 
       
   154     /* Skip to the end of the free list */
       
   155     prev = NULL;
       
   156     for (curr = list->free; curr; curr = curr->next) {
       
   157         prev = curr;
       
   158     }
       
   159 
       
   160     /* Add the list entries to the end */
       
   161     if (prev) {
       
   162         prev->next = list->list;
       
   163     } else {
       
   164         list->free = list->list;
       
   165     }
   153     list->list = NULL;
   166     list->list = NULL;
   154     list->count = 0;
   167     list->count = 0;
   155 }
   168 }
   156 
   169 
   157 void
   170 void