src/video/win32/SDL_gdirender.c
changeset 1965 a788656ca29a
parent 1924 69217fdd2c0a
child 1975 ccef0d0c40c6
--- a/src/video/win32/SDL_gdirender.c	Thu Aug 03 19:34:05 2006 +0000
+++ b/src/video/win32/SDL_gdirender.c	Sat Aug 05 17:09:42 2006 +0000
@@ -65,25 +65,25 @@
     GDI_CreateRenderer,
     {
      "gdi",
-     (SDL_Renderer_SingleBuffer | SDL_Renderer_PresentCopy |
-      SDL_Renderer_PresentFlip2 | SDL_Renderer_PresentFlip3 |
-      SDL_Renderer_PresentDiscard | SDL_Renderer_Accelerated),
-     (SDL_TextureBlendMode_None | SDL_TextureBlendMode_Mask |
-      SDL_TextureBlendMode_Blend),
-     (SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast),
+     (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY |
+      SDL_RENDERER_PRESENTFLIP2 | sDL_RENDERER_PRESENTFLIP3 |
+      SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
+     (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
+      SDL_TEXTUREBLENDMODE_BLEND),
+     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
      11,
      {
-      SDL_PixelFormat_Index8,
-      SDL_PixelFormat_RGB555,
-      SDL_PixelFormat_RGB565,
-      SDL_PixelFormat_RGB888,
-      SDL_PixelFormat_BGR888,
-      SDL_PixelFormat_ARGB8888,
-      SDL_PixelFormat_RGBA8888,
-      SDL_PixelFormat_ABGR8888,
-      SDL_PixelFormat_BGRA8888,
-      SDL_PixelFormat_YUY2,
-      SDL_PixelFormat_UYVY},
+      SDL_PIXELFORMAT_INDEX8,
+      SDL_PIXELFORMAT_RGB555,
+      SDL_PIXELFORMAT_RGB565,
+      SDL_PIXELFORMAT_RGB888,
+      SDL_PIXELFORMAT_BGR888,
+      SDL_PIXELFORMAT_ARGB8888,
+      SDL_PIXELFORMAT_RGBA8888,
+      SDL_PIXELFORMAT_ABGR8888,
+      SDL_PIXELFORMAT_BGRA8888,
+      SDL_PIXELFORMAT_YUY2,
+      SDL_PIXELFORMAT_UYVY},
      0,
      0}
 };
@@ -172,7 +172,7 @@
     renderer->window = window->id;
     renderer->driverdata = data;
 
-    renderer->info.flags = SDL_Renderer_Accelerated;
+    renderer->info.flags = SDL_RENDERER_ACCELERATED;
 
     data->hwnd = windowdata->hwnd;
     data->window_hdc = windowdata->hdc;
@@ -194,18 +194,18 @@
     GetDIBits(data->window_hdc, hbm, 0, 1, NULL, data->bmi, DIB_RGB_COLORS);
     DeleteObject(hbm);
 
-    if (flags & SDL_Renderer_SingleBuffer) {
+    if (flags & SDL_RENDERER_SINGLEBUFFER) {
         renderer->info.flags |=
-            (SDL_Renderer_SingleBuffer | SDL_Renderer_PresentCopy);
+            (SDL_RENDERER_SINGLEBUFFER | sDL_RENDERER_PRESENTCOPY);
         n = 0;
-    } else if (flags & SDL_Renderer_PresentFlip2) {
-        renderer->info.flags |= SDL_Renderer_PresentFlip2;
+    } else if (flags & SDL_RENDERER_PRESENTFLIP2) {
+        renderer->info.flags |= SDL_RENDERER_PRESENTFLIP2;
         n = 2;
-    } else if (flags & SDL_Renderer_PresentFlip3) {
-        renderer->info.flags |= SDL_Renderer_PresentFlip3;
+    } else if (flags & SDL_RENDERER_PRESENTFLIP3) {
+        renderer->info.flags |= SDL_RENDERER_PRESENTFLIP3;
         n = 3;
     } else {
-        renderer->info.flags |= SDL_Renderer_PresentCopy;
+        renderer->info.flags |= SDL_RENDERER_PRESENTCOPY;
         n = 1;
     }
     for (i = 0; i < n; ++i) {
@@ -257,7 +257,7 @@
     }
     data->pitch = (texture->w * SDL_BYTESPERPIXEL(data->format));
 
-    if (data->yuv || texture->access == SDL_TextureAccess_Local
+    if (data->yuv || texture->access == SDL_TEXTUREACCESS_LOCAL
         || texture->format != SDL_GetCurrentDisplayMode()->format) {
         int bmi_size;
         LPBITMAPINFO bmi;
@@ -537,7 +537,7 @@
         SelectPalette(data->memory_hdc, texturedata->hpal, TRUE);
         RealizePalette(data->memory_hdc);
     }
-    if (blendMode & (SDL_TextureBlendMode_Mask | SDL_TextureBlendMode_Blend)) {
+    if (blendMode & (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND)) {
         static BLENDFUNCTION blendFunc = {
             AC_SRC_OVER,
             0,
@@ -581,7 +581,7 @@
     SDL_DirtyRect *dirty;
 
     /* Send the data to the display */
-    if (!(renderer->info.flags & SDL_Renderer_SingleBuffer)) {
+    if (!(renderer->info.flags & SDL_RENDERER_SINGLEBUFFER)) {
         for (dirty = data->dirty.list; dirty; dirty = dirty->next) {
             const SDL_Rect *rect = &dirty->rect;
             BitBlt(data->window_hdc, rect->x, rect->y, rect->w, rect->h,
@@ -591,10 +591,10 @@
     }
 
     /* Update the flipping chain, if any */
-    if (renderer->info.flags & SDL_Renderer_PresentFlip2) {
+    if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP2) {
         data->current_hbm = (data->current_hbm + 1) % 2;
         SelectObject(data->render_hdc, data->hbm[data->current_hbm]);
-    } else if (renderer->info.flags & SDL_Renderer_PresentFlip3) {
+    } else if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP3) {
         data->current_hbm = (data->current_hbm + 1) % 3;
         SelectObject(data->render_hdc, data->hbm[data->current_hbm]);
     }