|
![](/i/fill.gif) |
Nicolas Calimet wrote:
> Maybe the following will be better (for a quick test only -- best is
> to properly deal with surface locking in all cases):
>
> if (SDL_LockSurface(m_screen) == 0) {
> SDL_BlitSurface(m_display, &m_update_rect, m_screen, &m_update_rect);
> SDL_UpdateRect(m_screen, m_update_rect.x, m_update_rect.y,
> m_update_rect.w, m_update_rect.h); SDL_UnlockSurface(m_screen);
> }
Surfaces that need locking must be locked before messing with the bitmap
array directly. Surfaces must NOT be locked for Blit to work.
Post a reply to this message
|
![](/i/fill.gif) |