# HG changeset patch # User Sam Lantinga # Date 993507404 0 # Node ID 1a2723474f1284f84203813232472b68de64c34d # Parent 8806bc1eb80e5873c3d0d705217c787dca540bcc 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. diff -r 8806bc1eb80e -r 1a2723474f12 src/video/SDL_yuv.c --- a/src/video/SDL_yuv.c Sat Jun 23 22:02:27 2001 +0000 +++ b/src/video/SDL_yuv.c Mon Jun 25 22:16:44 2001 +0000 @@ -48,13 +48,13 @@ 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)) ) {