src/video/win32/SDL_gdirender.c
changeset 1965 a788656ca29a
parent 1924 69217fdd2c0a
child 1975 ccef0d0c40c6
     1.1 --- a/src/video/win32/SDL_gdirender.c	Thu Aug 03 19:34:05 2006 +0000
     1.2 +++ b/src/video/win32/SDL_gdirender.c	Sat Aug 05 17:09:42 2006 +0000
     1.3 @@ -65,25 +65,25 @@
     1.4      GDI_CreateRenderer,
     1.5      {
     1.6       "gdi",
     1.7 -     (SDL_Renderer_SingleBuffer | SDL_Renderer_PresentCopy |
     1.8 -      SDL_Renderer_PresentFlip2 | SDL_Renderer_PresentFlip3 |
     1.9 -      SDL_Renderer_PresentDiscard | SDL_Renderer_Accelerated),
    1.10 -     (SDL_TextureBlendMode_None | SDL_TextureBlendMode_Mask |
    1.11 -      SDL_TextureBlendMode_Blend),
    1.12 -     (SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast),
    1.13 +     (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY |
    1.14 +      SDL_RENDERER_PRESENTFLIP2 | sDL_RENDERER_PRESENTFLIP3 |
    1.15 +      SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
    1.16 +     (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
    1.17 +      SDL_TEXTUREBLENDMODE_BLEND),
    1.18 +     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
    1.19       11,
    1.20       {
    1.21 -      SDL_PixelFormat_Index8,
    1.22 -      SDL_PixelFormat_RGB555,
    1.23 -      SDL_PixelFormat_RGB565,
    1.24 -      SDL_PixelFormat_RGB888,
    1.25 -      SDL_PixelFormat_BGR888,
    1.26 -      SDL_PixelFormat_ARGB8888,
    1.27 -      SDL_PixelFormat_RGBA8888,
    1.28 -      SDL_PixelFormat_ABGR8888,
    1.29 -      SDL_PixelFormat_BGRA8888,
    1.30 -      SDL_PixelFormat_YUY2,
    1.31 -      SDL_PixelFormat_UYVY},
    1.32 +      SDL_PIXELFORMAT_INDEX8,
    1.33 +      SDL_PIXELFORMAT_RGB555,
    1.34 +      SDL_PIXELFORMAT_RGB565,
    1.35 +      SDL_PIXELFORMAT_RGB888,
    1.36 +      SDL_PIXELFORMAT_BGR888,
    1.37 +      SDL_PIXELFORMAT_ARGB8888,
    1.38 +      SDL_PIXELFORMAT_RGBA8888,
    1.39 +      SDL_PIXELFORMAT_ABGR8888,
    1.40 +      SDL_PIXELFORMAT_BGRA8888,
    1.41 +      SDL_PIXELFORMAT_YUY2,
    1.42 +      SDL_PIXELFORMAT_UYVY},
    1.43       0,
    1.44       0}
    1.45  };
    1.46 @@ -172,7 +172,7 @@
    1.47      renderer->window = window->id;
    1.48      renderer->driverdata = data;
    1.49  
    1.50 -    renderer->info.flags = SDL_Renderer_Accelerated;
    1.51 +    renderer->info.flags = SDL_RENDERER_ACCELERATED;
    1.52  
    1.53      data->hwnd = windowdata->hwnd;
    1.54      data->window_hdc = windowdata->hdc;
    1.55 @@ -194,18 +194,18 @@
    1.56      GetDIBits(data->window_hdc, hbm, 0, 1, NULL, data->bmi, DIB_RGB_COLORS);
    1.57      DeleteObject(hbm);
    1.58  
    1.59 -    if (flags & SDL_Renderer_SingleBuffer) {
    1.60 +    if (flags & SDL_RENDERER_SINGLEBUFFER) {
    1.61          renderer->info.flags |=
    1.62 -            (SDL_Renderer_SingleBuffer | SDL_Renderer_PresentCopy);
    1.63 +            (SDL_RENDERER_SINGLEBUFFER | sDL_RENDERER_PRESENTCOPY);
    1.64          n = 0;
    1.65 -    } else if (flags & SDL_Renderer_PresentFlip2) {
    1.66 -        renderer->info.flags |= SDL_Renderer_PresentFlip2;
    1.67 +    } else if (flags & SDL_RENDERER_PRESENTFLIP2) {
    1.68 +        renderer->info.flags |= SDL_RENDERER_PRESENTFLIP2;
    1.69          n = 2;
    1.70 -    } else if (flags & SDL_Renderer_PresentFlip3) {
    1.71 -        renderer->info.flags |= SDL_Renderer_PresentFlip3;
    1.72 +    } else if (flags & SDL_RENDERER_PRESENTFLIP3) {
    1.73 +        renderer->info.flags |= SDL_RENDERER_PRESENTFLIP3;
    1.74          n = 3;
    1.75      } else {
    1.76 -        renderer->info.flags |= SDL_Renderer_PresentCopy;
    1.77 +        renderer->info.flags |= SDL_RENDERER_PRESENTCOPY;
    1.78          n = 1;
    1.79      }
    1.80      for (i = 0; i < n; ++i) {
    1.81 @@ -257,7 +257,7 @@
    1.82      }
    1.83      data->pitch = (texture->w * SDL_BYTESPERPIXEL(data->format));
    1.84  
    1.85 -    if (data->yuv || texture->access == SDL_TextureAccess_Local
    1.86 +    if (data->yuv || texture->access == SDL_TEXTUREACCESS_LOCAL
    1.87          || texture->format != SDL_GetCurrentDisplayMode()->format) {
    1.88          int bmi_size;
    1.89          LPBITMAPINFO bmi;
    1.90 @@ -537,7 +537,7 @@
    1.91          SelectPalette(data->memory_hdc, texturedata->hpal, TRUE);
    1.92          RealizePalette(data->memory_hdc);
    1.93      }
    1.94 -    if (blendMode & (SDL_TextureBlendMode_Mask | SDL_TextureBlendMode_Blend)) {
    1.95 +    if (blendMode & (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND)) {
    1.96          static BLENDFUNCTION blendFunc = {
    1.97              AC_SRC_OVER,
    1.98              0,
    1.99 @@ -581,7 +581,7 @@
   1.100      SDL_DirtyRect *dirty;
   1.101  
   1.102      /* Send the data to the display */
   1.103 -    if (!(renderer->info.flags & SDL_Renderer_SingleBuffer)) {
   1.104 +    if (!(renderer->info.flags & SDL_RENDERER_SINGLEBUFFER)) {
   1.105          for (dirty = data->dirty.list; dirty; dirty = dirty->next) {
   1.106              const SDL_Rect *rect = &dirty->rect;
   1.107              BitBlt(data->window_hdc, rect->x, rect->y, rect->w, rect->h,
   1.108 @@ -591,10 +591,10 @@
   1.109      }
   1.110  
   1.111      /* Update the flipping chain, if any */
   1.112 -    if (renderer->info.flags & SDL_Renderer_PresentFlip2) {
   1.113 +    if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP2) {
   1.114          data->current_hbm = (data->current_hbm + 1) % 2;
   1.115          SelectObject(data->render_hdc, data->hbm[data->current_hbm]);
   1.116 -    } else if (renderer->info.flags & SDL_Renderer_PresentFlip3) {
   1.117 +    } else if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP3) {
   1.118          data->current_hbm = (data->current_hbm + 1) % 3;
   1.119          SelectObject(data->render_hdc, data->hbm[data->current_hbm]);
   1.120      }