Mercurial > sdl-ios-xcode
comparison src/video/SDL_surface.c @ 526:4314a501d7be
Fixed a crash blitting RLE surfaces to RLE surfaces
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Oct 2002 07:56:36 +0000 |
parents | c7da0cd5ae5e |
children | 058d47b7a3b4 |
comparison
equal
deleted
inserted
replaced
525:f55cdaec12b9 | 526:4314a501d7be |
---|---|
690 return(0); | 690 return(0); |
691 } | 691 } |
692 | 692 |
693 /* | 693 /* |
694 * Lock a surface to directly access the pixels | 694 * Lock a surface to directly access the pixels |
695 * -- Do not call this from any blit function, as SDL_DrawCursor() may recurse | |
696 * Instead, use: | |
697 * if ( (surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) | |
698 * video->LockHWSurface(video, surface); | |
699 */ | 695 */ |
700 int SDL_LockSurface (SDL_Surface *surface) | 696 int SDL_LockSurface (SDL_Surface *surface) |
701 { | 697 { |
702 if ( ! surface->locked ) { | 698 if ( ! surface->locked ) { |
703 /* Perform the lock */ | 699 /* Perform the lock */ |
722 /* Ready to go.. */ | 718 /* Ready to go.. */ |
723 return(0); | 719 return(0); |
724 } | 720 } |
725 /* | 721 /* |
726 * Unlock a previously locked surface | 722 * Unlock a previously locked surface |
727 * -- Do not call this from any blit function, as SDL_DrawCursor() may recurse | |
728 * Instead, use: | |
729 * if ( (surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE ) | |
730 * video->UnlockHWSurface(video, surface); | |
731 */ | 723 */ |
732 void SDL_UnlockSurface (SDL_Surface *surface) | 724 void SDL_UnlockSurface (SDL_Surface *surface) |
733 { | 725 { |
734 /* Only perform an unlock if we are locked */ | 726 /* Only perform an unlock if we are locked */ |
735 if ( ! surface->locked || (--surface->locked > 0) ) { | 727 if ( ! surface->locked || (--surface->locked > 0) ) { |