Mercurial > sdl-ios-xcode
comparison src/video/SDL_video.c @ 306:3879bed3395c
Only put surfaces in video memory if there are accelerated blits
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 10 Mar 2002 03:38:32 +0000 |
parents | f6ffac90895c |
children | 67ad846ed21c |
comparison
equal
deleted
inserted
replaced
305:9c6613983e85 | 306:3879bed3395c |
---|---|
842 if ( ! SDL_PublicSurface ) { | 842 if ( ! SDL_PublicSurface ) { |
843 SDL_SetError("No video mode has been set"); | 843 SDL_SetError("No video mode has been set"); |
844 return(NULL); | 844 return(NULL); |
845 } | 845 } |
846 /* Set the flags appropriate for copying to display surface */ | 846 /* Set the flags appropriate for copying to display surface */ |
847 flags = (SDL_PublicSurface->flags&SDL_HWSURFACE); | 847 if ((SDL_PublicSurface->flags&SDL_HWSURFACE == SDL_HWSURFACE) && current_video->info.blit_hw) |
848 flags = SDL_HWSURFACE; | |
849 else | |
850 flags = SDL_SWSURFACE; | |
848 #ifdef AUTORLE_DISPLAYFORMAT | 851 #ifdef AUTORLE_DISPLAYFORMAT |
849 flags |= (surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA)); | 852 flags |= (surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA)); |
850 flags |= SDL_RLEACCELOK; | 853 flags |= SDL_RLEACCELOK; |
851 #else | 854 #else |
852 flags |= surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA|SDL_RLEACCELOK); | 855 flags |= surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA|SDL_RLEACCELOK); |