[SDL] Possible bug in FillRect?

Ryan C. Gordon icculus at icculus.org
Sun Jul 17 12:54:25 PDT 2011


> If you are doing this:
> SDL_FillRect(surface,&(surface->clip_rect),
> SDL_MapRGB(new_surface->format,r,g,b));

You're asking it to MapRGB from one format, and then then filling it 
into a different format surface.

Try this:

    SDL_FillRect(surface,&(surface->clip_rect),
                 SDL_MapRGB(surface->format,r,g,b));

--ryan.




More information about the SDL mailing list