comparison src/video/SDL_yuv.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents 450721ad5436
children 604d73db6802
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
42 SDL_SetError("YUV overlays are not supported in OpenGL mode"); 42 SDL_SetError("YUV overlays are not supported in OpenGL mode");
43 return NULL; 43 return NULL;
44 } 44 }
45 45
46 /* Display directly on video surface, if possible */ 46 /* Display directly on video surface, if possible */
47 if ( getenv("SDL_VIDEO_YUV_DIRECT") ) { 47 if ( SDL_getenv("SDL_VIDEO_YUV_DIRECT") ) {
48 if ( (display == SDL_PublicSurface) && 48 if ( (display == SDL_PublicSurface) &&
49 ((SDL_VideoSurface->format->BytesPerPixel == 2) || 49 ((SDL_VideoSurface->format->BytesPerPixel == 2) ||
50 (SDL_VideoSurface->format->BytesPerPixel == 4)) ) { 50 (SDL_VideoSurface->format->BytesPerPixel == 4)) ) {
51 display = SDL_VideoSurface; 51 display = SDL_VideoSurface;
52 } 52 }
53 } 53 }
54 overlay = NULL; 54 overlay = NULL;
55 yuv_hwaccel = getenv("SDL_VIDEO_YUV_HWACCEL"); 55 yuv_hwaccel = SDL_getenv("SDL_VIDEO_YUV_HWACCEL");
56 if ( ((display == SDL_VideoSurface) && video->CreateYUVOverlay) && 56 if ( ((display == SDL_VideoSurface) && video->CreateYUVOverlay) &&
57 (!yuv_hwaccel || (*yuv_hwaccel != '0')) ) { 57 (!yuv_hwaccel || (*yuv_hwaccel != '0')) ) {
58 overlay = video->CreateYUVOverlay(this, w, h, format, display); 58 overlay = video->CreateYUVOverlay(this, w, h, format, display);
59 } 59 }
60 /* If hardware YUV overlay failed ... */ 60 /* If hardware YUV overlay failed ... */
83 { 83 {
84 if ( overlay ) { 84 if ( overlay ) {
85 if ( overlay->hwfuncs ) { 85 if ( overlay->hwfuncs ) {
86 overlay->hwfuncs->FreeHW(current_video, overlay); 86 overlay->hwfuncs->FreeHW(current_video, overlay);
87 } 87 }
88 free(overlay); 88 SDL_free(overlay);
89 } 89 }
90 } 90 }