diff src/video/SDL_video.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 6b89d83b0b5a
children 85969cc5098c
line wrap: on
line diff
--- a/src/video/SDL_video.c	Thu Dec 02 11:56:23 2010 -0800
+++ b/src/video/SDL_video.c	Sun Dec 12 15:19:05 2010 -0800
@@ -1959,8 +1959,8 @@
 
     {
         Uint8 r, g, b, a;
-        int blendMode;
-        int scaleMode;
+        SDL_BlendMode blendMode;
+        SDL_ScaleMode scaleMode;
 
         SDL_GetSurfaceColorMod(surface, &r, &g, &b);
         SDL_SetTextureColorMod(texture, r, g, b);
@@ -2129,7 +2129,7 @@
 }
 
 int
-SDL_SetTextureBlendMode(SDL_Texture * texture, int blendMode)
+SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode)
 {
     SDL_Renderer *renderer;
 
@@ -2145,7 +2145,7 @@
 }
 
 int
-SDL_GetTextureBlendMode(SDL_Texture * texture, int *blendMode)
+SDL_GetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode *blendMode)
 {
     CHECK_TEXTURE_MAGIC(texture, -1);
 
@@ -2156,7 +2156,7 @@
 }
 
 int
-SDL_SetTextureScaleMode(SDL_Texture * texture, int scaleMode)
+SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)
 {
     SDL_Renderer *renderer;
 
@@ -2172,7 +2172,7 @@
 }
 
 int
-SDL_GetTextureScaleMode(SDL_Texture * texture, int *scaleMode)
+SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode)
 {
     CHECK_TEXTURE_MAGIC(texture, -1);
 
@@ -2315,7 +2315,7 @@
 }
 
 int
-SDL_SetRenderDrawBlendMode(int blendMode)
+SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode)
 {
     SDL_Renderer *renderer;
 
@@ -2332,7 +2332,7 @@
 }
 
 int
-SDL_GetRenderDrawBlendMode(int *blendMode)
+SDL_GetRenderDrawBlendMode(SDL_BlendMode *blendMode)
 {
     SDL_Renderer *renderer;
 
@@ -2354,7 +2354,7 @@
         return -1;
     }
     if (!renderer->RenderClear) {
-        int blendMode = renderer->blendMode;
+        SDL_BlendMode blendMode = renderer->blendMode;
         int status;
 
         if (blendMode >= SDL_BLENDMODE_BLEND) {