[SDL] Collecting Input using SDL_CreateWindowFrom

Mako_energy mako_energy02 at yahoo.com
Sun Jul 31 13:02:46 PDT 2011


Hi Ryan,

> 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));
>    

I *think* that was a copy-and-paste typo - I manually changed (nearly) 
all the new_surfaces into surface in order to make the code clearer. DOH!

Anyway, I'll retest and get back to you.


Regards,
Rob





More information about the SDL mailing list