src/SDL12_compat.c
changeset 67 4df59270e628
parent 66 5cd0103f58ca
child 68 29c66e3bd07e
equal deleted inserted replaced
66:5cd0103f58ca 67:4df59270e628
  1406 }
  1406 }
  1407 
  1407 
  1408 DECLSPEC int SDLCALL
  1408 DECLSPEC int SDLCALL
  1409 SDL_FillRect(SDL12_Surface *dst, SDL_Rect *dstrect, Uint32 color)
  1409 SDL_FillRect(SDL12_Surface *dst, SDL_Rect *dstrect, Uint32 color)
  1410 {
  1410 {
  1411     const SDL_Rect orig_dstrect = *dstrect;
  1411     const int retval = SDL20_FillRect(dst->surface20, dstrect, color);
  1412     const int retval = SDL20_FillRect(dst->surface20, &orig_dstrect, color);
       
  1413     if (retval != -1)
  1412     if (retval != -1)
  1414     {
  1413     {
  1415         if (dstrect)  /* 1.2 stores the clip intersection in dstrect */
  1414         if (dstrect) {  /* 1.2 stores the clip intersection in dstrect */
       
  1415             const SDL_Rect orig_dstrect = *dstrect;
  1416             SDL20_IntersectRect(&orig_dstrect, &dst->clip_rect, dstrect);
  1416             SDL20_IntersectRect(&orig_dstrect, &dst->clip_rect, dstrect);
       
  1417         }
  1417     }
  1418     }
  1418     return retval;
  1419     return retval;
  1419 }
  1420 }
  1420 
  1421 
  1421 
  1422