PDA

View Full Version : SDL_Surface's


sealfin
2003.09.25, 05:14 PM
Just a quick query, but are SDL_Surface's created locked or unlocked? (i.e. surfaces returned by SDL_SetVideoMode or IMG_Load)

IBethune
2003.09.25, 05:43 PM
I would imagine they are unlocked (docs don't say either way), but does it really matter? If you are doing pixel-editing you should always call SDL_LockSurface first then SDL_UnlockSurface afterwards, then you'll always be safe.

- Iain

sealfin
2003.09.25, 05:52 PM
[...]but does it really matter?
I would've thought so, as for reasons ineffable to mere mortals, the locks are recursive... Um, or maybe it doesn't - I need to code a few tests...