comparison src/video/SDL_surface.c @ 1666:6e7ec5cb83c3 SDL-1.3

The dummy video driver compiles. :)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 21:56:07 +0000
parents 782fd950bd46
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1665:28193f833b2b 1666:6e7ec5cb83c3
894 * Free a surface created by the above function. 894 * Free a surface created by the above function.
895 */ 895 */
896 void 896 void
897 SDL_FreeSurface (SDL_Surface * surface) 897 SDL_FreeSurface (SDL_Surface * surface)
898 { 898 {
899 SDL_VideoDevice *_this = SDL_GetVideoDevice (); 899 if (surface == NULL) {
900
901 /* Free anything that's not NULL, and not the screen surface */
902 if ((surface == NULL) ||
903 (_this &&
904 ((surface == SDL_ShadowSurface) || (surface == SDL_VideoSurface)))) {
905 return; 900 return;
906 } 901 }
907 if (--surface->refcount > 0) { 902 if (--surface->refcount > 0) {
908 return; 903 return;
909 } 904 }