src/video/SDL_yuv.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/video/SDL_yuv.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/video/SDL_yuv.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -30,21 +30,21 @@
     1.4  
     1.5  
     1.6  SDL_Overlay *
     1.7 -SDL_CreateYUVOverlay (int w, int h, Uint32 format, SDL_Surface * display)
     1.8 +SDL_CreateYUVOverlay(int w, int h, Uint32 format, SDL_Surface * display)
     1.9  {
    1.10 -    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
    1.11 +    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    1.12      SDL_Window *window;
    1.13      const char *yuv_hwaccel;
    1.14      SDL_Overlay *overlay;
    1.15  
    1.16 -    window = SDL_GetWindowFromSurface (display);
    1.17 +    window = SDL_GetWindowFromSurface(display);
    1.18      if (window && (window->flags & SDL_WINDOW_OPENGL)) {
    1.19 -        SDL_SetError ("YUV overlays are not supported in OpenGL mode");
    1.20 +        SDL_SetError("YUV overlays are not supported in OpenGL mode");
    1.21          return NULL;
    1.22      }
    1.23  
    1.24      /* Display directly on video surface, if possible */
    1.25 -    if (SDL_getenv ("SDL_VIDEO_YUV_DIRECT")) {
    1.26 +    if (SDL_getenv("SDL_VIDEO_YUV_DIRECT")) {
    1.27          if (window &&
    1.28              ((window->surface->format->BytesPerPixel == 2) ||
    1.29               (window->surface->format->BytesPerPixel == 4))) {
    1.30 @@ -52,36 +52,36 @@
    1.31          }
    1.32      }
    1.33      overlay = NULL;
    1.34 -    yuv_hwaccel = SDL_getenv ("SDL_VIDEO_YUV_HWACCEL");
    1.35 +    yuv_hwaccel = SDL_getenv("SDL_VIDEO_YUV_HWACCEL");
    1.36      if (((display->flags & SDL_SCREEN_SURFACE) && _this->CreateYUVOverlay) &&
    1.37 -        (!yuv_hwaccel || (SDL_atoi (yuv_hwaccel) > 0))) {
    1.38 -        overlay = _this->CreateYUVOverlay (_this, w, h, format, display);
    1.39 +        (!yuv_hwaccel || (SDL_atoi(yuv_hwaccel) > 0))) {
    1.40 +        overlay = _this->CreateYUVOverlay(_this, w, h, format, display);
    1.41      }
    1.42      /* If hardware YUV overlay failed ... */
    1.43      if (overlay == NULL) {
    1.44 -        overlay = SDL_CreateYUV_SW (_this, w, h, format, display);
    1.45 +        overlay = SDL_CreateYUV_SW(_this, w, h, format, display);
    1.46      }
    1.47      return overlay;
    1.48  }
    1.49  
    1.50  int
    1.51 -SDL_LockYUVOverlay (SDL_Overlay * overlay)
    1.52 +SDL_LockYUVOverlay(SDL_Overlay * overlay)
    1.53  {
    1.54 -    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
    1.55 -    return overlay->hwfuncs->Lock (_this, overlay);
    1.56 +    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    1.57 +    return overlay->hwfuncs->Lock(_this, overlay);
    1.58  }
    1.59  
    1.60  void
    1.61 -SDL_UnlockYUVOverlay (SDL_Overlay * overlay)
    1.62 +SDL_UnlockYUVOverlay(SDL_Overlay * overlay)
    1.63  {
    1.64 -    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
    1.65 -    overlay->hwfuncs->Unlock (_this, overlay);
    1.66 +    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    1.67 +    overlay->hwfuncs->Unlock(_this, overlay);
    1.68  }
    1.69  
    1.70  int
    1.71 -SDL_DisplayYUVOverlay (SDL_Overlay * overlay, SDL_Rect * dstrect)
    1.72 +SDL_DisplayYUVOverlay(SDL_Overlay * overlay, SDL_Rect * dstrect)
    1.73  {
    1.74 -    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
    1.75 +    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    1.76      SDL_Rect src, dst;
    1.77      int srcx, srcy, srcw, srch;
    1.78      int dstx, dsty, dstw, dsth;
    1.79 @@ -129,18 +129,18 @@
    1.80      dst.y = dsty;
    1.81      dst.w = dstw;
    1.82      dst.h = dsth;
    1.83 -    return overlay->hwfuncs->Display (_this, overlay, &src, &dst);
    1.84 +    return overlay->hwfuncs->Display(_this, overlay, &src, &dst);
    1.85  }
    1.86  
    1.87  void
    1.88 -SDL_FreeYUVOverlay (SDL_Overlay * overlay)
    1.89 +SDL_FreeYUVOverlay(SDL_Overlay * overlay)
    1.90  {
    1.91 -    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
    1.92 +    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    1.93      if (overlay) {
    1.94          if (overlay->hwfuncs) {
    1.95 -            overlay->hwfuncs->FreeHW (_this, overlay);
    1.96 +            overlay->hwfuncs->FreeHW(_this, overlay);
    1.97          }
    1.98 -        SDL_free (overlay);
    1.99 +        SDL_free(overlay);
   1.100      }
   1.101  }
   1.102