src/video/SDL_video.c
changeset 306 3879bed3395c
parent 297 f6ffac90895c
child 313 67ad846ed21c
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);