Possible Solution to SDL_surface copying

Oct 1, 2009 at 11:34 PM

 

http://www.nabble.com/Copying-one-SDL_Surface-to-another-SDL_Surface,-how-i-do-it-properly--td18290890.html


SDL_Surface* screenTEMP = SDL_ConvertSurface(Screen, Screen->format, SDL_SWSURFACE);

And you can wrap this in a function easily (from Sprig):

static inline SDL_Surface* CopySDLSurface(SDL_Surface* src)
{
    return SDL_ConvertSurface(src, src->format, SDL_SWSURFACE);
}

Jonny D

Oct 2, 2009 at 11:19 PM

Nice, will try it out.

Oct 2, 2009 at 11:19 PM

My Xbox hasn't arrived yet :(

Oct 5, 2009 at 4:39 AM

Thx, this solution worked.