[SDL] Re: Scaleing, SDL_DOUBLEBUF, SetVidMode, etc.....

Pierre Phaneuf pp at ludusdesign.com
Fri Apr 14 07:59:10 PDT 2000

Sam Lantinga wrote:

> You should always check to see if you need to lock a surface before
> accessing the pixels.  A lock is necessary when the SDL_MUSTLOCK(surface)
> macro evaluates to true.  You should never assume that you can blindly
> write to a video surface without locking it, otherwise your code will
> work on some platforms and video drivers, but not others (and it's tough
> to debug in the fullscreen modes in which this often matters.)

Locking? Is that new? And rather than have an SDL_MUSTLOCK macro, why
not require locking all the time and make it a no-op on surfaces that
don't require it?

Pierre Phaneuf

More information about the SDL mailing list