diff src/video/win32/SDL_d3drender.c @ 4929:aa8888658021

Use the enumerated type for blend and scale mode instead of int Renamed SDL_TextureScaleMode to SDL_ScaleMode
author Sam Lantinga <slouken@libsdl.org>
date Sun, 12 Dec 2010 15:19:05 -0800
parents e1664f94f026
children
line wrap: on
line diff
--- a/src/video/win32/SDL_d3drender.c	Thu Dec 02 11:56:23 2010 -0800
+++ b/src/video/win32/SDL_d3drender.c	Sun Dec 12 15:19:05 2010 -0800
@@ -150,8 +150,8 @@
       SDL_TEXTUREMODULATE_ALPHA),
      (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
       SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
-     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
-      SDL_TEXTURESCALEMODE_SLOW | SDL_TEXTURESCALEMODE_BEST),
+     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
+      SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST),
      0,
      {0},
      0,
@@ -807,14 +807,14 @@
 D3D_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
 {
     switch (texture->scaleMode) {
-    case SDL_TEXTURESCALEMODE_NONE:
-    case SDL_TEXTURESCALEMODE_FAST:
-    case SDL_TEXTURESCALEMODE_SLOW:
-    case SDL_TEXTURESCALEMODE_BEST:
+    case SDL_SCALEMODE_NONE:
+    case SDL_SCALEMODE_FAST:
+    case SDL_SCALEMODE_SLOW:
+    case SDL_SCALEMODE_BEST:
         return 0;
     default:
         SDL_Unsupported();
-        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
+        texture->scaleMode = SDL_SCALEMODE_NONE;
         return -1;
     }
     return 0;
@@ -1343,20 +1343,20 @@
     }
 
     switch (texture->scaleMode) {
-    case SDL_TEXTURESCALEMODE_NONE:
-    case SDL_TEXTURESCALEMODE_FAST:
+    case SDL_SCALEMODE_NONE:
+    case SDL_SCALEMODE_FAST:
         IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
                                          D3DTEXF_POINT);
         IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
                                          D3DTEXF_POINT);
         break;
-    case SDL_TEXTURESCALEMODE_SLOW:
+    case SDL_SCALEMODE_SLOW:
         IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
                                          D3DTEXF_LINEAR);
         IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
                                          D3DTEXF_LINEAR);
         break;
-    case SDL_TEXTURESCALEMODE_BEST:
+    case SDL_SCALEMODE_BEST:
         IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
                                          D3DTEXF_GAUSSIANQUAD);
         IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,