src/SDL_compat.c
changeset 1965 a788656ca29a
parent 1936 83946ee0ff1f
child 1967 01e29c3e9a29
     1.1 --- a/src/SDL_compat.c	Thu Aug 03 19:34:05 2006 +0000
     1.2 +++ b/src/SDL_compat.c	Sat Aug 05 17:09:42 2006 +0000
     1.3 @@ -401,23 +401,23 @@
     1.4              if (desktop_format) {
     1.5                  desired_format = desktop_format;
     1.6              } else {
     1.7 -                desired_format = SDL_PixelFormat_RGB888;
     1.8 +                desired_format = SDL_PIXELFORMAT_RGB888;
     1.9              }
    1.10              break;
    1.11          case 8:
    1.12 -            desired_format = SDL_PixelFormat_Index8;
    1.13 +            desired_format = SDL_PIXELFORMAT_INDEX8;
    1.14              break;
    1.15          case 15:
    1.16 -            desired_format = SDL_PixelFormat_RGB555;
    1.17 +            desired_format = SDL_PIXELFORMAT_RGB555;
    1.18              break;
    1.19          case 16:
    1.20 -            desired_format = SDL_PixelFormat_RGB565;
    1.21 +            desired_format = SDL_PIXELFORMAT_RGB565;
    1.22              break;
    1.23          case 24:
    1.24 -            desired_format = SDL_PixelFormat_RGB24;
    1.25 +            desired_format = SDL_PIXELFORMAT_RGB24;
    1.26              break;
    1.27          case 32:
    1.28 -            desired_format = SDL_PixelFormat_RGB888;
    1.29 +            desired_format = SDL_PIXELFORMAT_RGB888;
    1.30              break;
    1.31          default:
    1.32              SDL_SetError("Unsupported bpp in SDL_SetVideoMode()");
    1.33 @@ -458,18 +458,18 @@
    1.34      /* Create a renderer for the window */
    1.35      if (SDL_CreateRenderer
    1.36          (SDL_VideoWindow, -1,
    1.37 -         SDL_Renderer_SingleBuffer | SDL_Renderer_PresentDiscard) < 0) {
    1.38 +         SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD) < 0) {
    1.39          return NULL;
    1.40      }
    1.41      SDL_GetRendererInfo(-1, &SDL_VideoRendererInfo);
    1.42  
    1.43      /* Create a texture for the screen surface */
    1.44      SDL_VideoTexture =
    1.45 -        SDL_CreateTexture(desired_format, SDL_TextureAccess_Local, width,
    1.46 +        SDL_CreateTexture(desired_format, SDL_TEXTUREACCESS_LOCAL, width,
    1.47                            height);
    1.48      if (!SDL_VideoTexture) {
    1.49          SDL_VideoTexture =
    1.50 -            SDL_CreateTexture(SDL_PixelFormat_RGB888, SDL_TextureAccess_Local,
    1.51 +            SDL_CreateTexture(SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_LOCAL,
    1.52                                width, height);
    1.53      }
    1.54      if (!SDL_VideoTexture) {
    1.55 @@ -659,11 +659,11 @@
    1.56          screen = SDL_VideoSurface;
    1.57      }
    1.58      if (screen == SDL_VideoSurface) {
    1.59 -        if (SDL_VideoRendererInfo.flags & SDL_Renderer_PresentCopy) {
    1.60 +        if (SDL_VideoRendererInfo.flags & SDL_RENDERER_PRESENTCOPY) {
    1.61              for (i = 0; i < numrects; ++i) {
    1.62                  SDL_RenderCopy(SDL_VideoTexture, &rects[i], &rects[i],
    1.63 -                               SDL_TextureBlendMode_None,
    1.64 -                               SDL_TextureScaleMode_None);
    1.65 +                               SDL_TEXTUREBLENDMODE_NONE,
    1.66 +                               SDL_TEXTURESCALEMODE_NONE);
    1.67              }
    1.68          } else {
    1.69              SDL_Rect rect;
    1.70 @@ -672,8 +672,8 @@
    1.71              rect.w = screen->w;
    1.72              rect.h = screen->h;
    1.73              SDL_RenderCopy(SDL_VideoTexture, &rect, &rect,
    1.74 -                           SDL_TextureBlendMode_None,
    1.75 -                           SDL_TextureScaleMode_None);
    1.76 +                           SDL_TEXTUREBLENDMODE_NONE,
    1.77 +                           SDL_TEXTURESCALEMODE_NONE);
    1.78          }
    1.79          SDL_RenderPresent();
    1.80      }
    1.81 @@ -1304,19 +1304,19 @@
    1.82  
    1.83      switch (format) {
    1.84      case SDL_YV12_OVERLAY:
    1.85 -        texture_format = SDL_PixelFormat_YV12;
    1.86 +        texture_format = SDL_PIXELFORMAT_YV12;
    1.87          break;
    1.88      case SDL_IYUV_OVERLAY:
    1.89 -        texture_format = SDL_PixelFormat_IYUV;
    1.90 +        texture_format = SDL_PIXELFORMAT_IYUV;
    1.91          break;
    1.92      case SDL_YUY2_OVERLAY:
    1.93 -        texture_format = SDL_PixelFormat_YUY2;
    1.94 +        texture_format = SDL_PIXELFORMAT_YUY2;
    1.95          break;
    1.96      case SDL_UYVY_OVERLAY:
    1.97 -        texture_format = SDL_PixelFormat_UYVY;
    1.98 +        texture_format = SDL_PIXELFORMAT_UYVY;
    1.99          break;
   1.100      case SDL_YVYU_OVERLAY:
   1.101 -        texture_format = SDL_PixelFormat_YVYU;
   1.102 +        texture_format = SDL_PIXELFORMAT_YVYU;
   1.103          break;
   1.104      default:
   1.105          SDL_SetError("Unknown YUV format");
   1.106 @@ -1364,7 +1364,7 @@
   1.107      }
   1.108  
   1.109      overlay->hwdata->textureID =
   1.110 -        SDL_CreateTexture(texture_format, SDL_TextureAccess_Local, w, h);
   1.111 +        SDL_CreateTexture(texture_format, SDL_TEXTUREACCESS_LOCAL, w, h);
   1.112      if (!overlay->hwdata->textureID) {
   1.113          SDL_FreeYUVOverlay(overlay);
   1.114          return NULL;
   1.115 @@ -1410,8 +1410,8 @@
   1.116  SDL_DisplayYUVOverlay(SDL_Overlay * overlay, SDL_Rect * dstrect)
   1.117  {
   1.118      if (SDL_RenderCopy(overlay->hwdata->textureID, NULL, dstrect,
   1.119 -                       SDL_TextureBlendMode_None,
   1.120 -                       SDL_TextureScaleMode_Fast) < 0) {
   1.121 +                       SDL_TEXTUREBLENDMODE_NONE,
   1.122 +                       SDL_TEXTURESCALEMODE_FAST) < 0) {
   1.123          return -1;
   1.124      }
   1.125      SDL_RenderPresent();