-boolean SDLSetNativeSurface(SDL_Surface **surface)
-{
- SDL_Surface *new_surface;
-
- if (surface == NULL ||
- *surface == NULL ||
- backbuffer == NULL ||
- backbuffer->surface == NULL)
- return FALSE;
-
- // if pixel format already optimized for destination surface, do nothing
- if (equalSDLPixelFormat((*surface)->format, backbuffer->surface->format))
- return FALSE;
-
- new_surface = SDL_ConvertSurface(*surface, backbuffer->surface->format, 0);
-
- if (new_surface == NULL)
- Error(ERR_EXIT, "SDL_ConvertSurface() failed: %s", SDL_GetError());
-
- SDL_FreeSurface(*surface);
-
- *surface = new_surface;
-
- return TRUE;
-}
-