Added the SDL_VIDEO_YUV_DIRECT hack for better performance when the

requested video mode is 16 bpp but the real video mode is 32 bpp.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4082
This commit is contained in:
Sam Lantinga 2001-06-25 22:16:44 +00:00
parent 3fe72f0ebb
commit 143a1a0938

View File

@ -48,13 +48,13 @@ SDL_Overlay *SDL_CreateYUVOverlay(int w, int h, Uint32 format,
overlay = NULL;
/* Display directly on video surface, if possible */
#if 0
if ( (display == SDL_PublicSurface) &&
((SDL_VideoSurface->format->BytesPerPixel == 2) ||
(SDL_VideoSurface->format->BytesPerPixel == 4)) ) {
display = SDL_VideoSurface;
if ( getenv("SDL_VIDEO_YUV_DIRECT") ) {
if ( (display == SDL_PublicSurface) &&
((SDL_VideoSurface->format->BytesPerPixel == 2) ||
(SDL_VideoSurface->format->BytesPerPixel == 4)) ) {
display = SDL_VideoSurface;
}
}
#endif
yuv_hwaccel = getenv("SDL_VIDEO_YUV_HWACCEL");
if ( ((display == SDL_VideoSurface) && video->CreateYUVOverlay) &&
(!yuv_hwaccel || (atoi(yuv_hwaccel) > 0)) ) {