Skip to content

Commit

Permalink
Added the SDL_VIDEO_YUV_DIRECT hack for better performance when the
Browse files Browse the repository at this point in the history
requested video mode is 16 bpp but the real video mode is 32 bpp.
  • Loading branch information
Sam Lantinga committed Jun 25, 2001
1 parent f7fdaba commit f52db6f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/video/SDL_yuv.c
Expand Up @@ -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)) ) {
Expand Down

0 comments on commit f52db6f

Please sign in to comment.