diff src/video/directfb/SDL_DirectFB_render.c @ 3037:490f3e4fe753

Added DFB_VERSION_ATLEAST macro First attempt at replacing MakeSubSurface for pre 1.2.0 ==> Scaling not yet working
author Couriersud <couriersud@arcor.de>
date Tue, 13 Jan 2009 21:17:38 +0000
parents d72a0dd80e8b
children c73a5f8a03d2
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_render.c	Tue Jan 13 19:31:06 2009 +0000
+++ b/src/video/directfb/SDL_DirectFB_render.c	Tue Jan 13 21:17:38 2009 +0000
@@ -140,7 +140,7 @@
     IDirectFBPalette *palette;
     SDL_VideoDisplay *display;
     SDL_DirtyRectList dirty;
-#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
+#if (DFB_VERSION_ATLEAST(1,2,0))
     DFBSurfaceRenderOptions render_options;
 #endif
 } DirectFB_TextureData;
@@ -387,7 +387,7 @@
     case SDL_PIXELFORMAT_INDEX4MSB:
         return DSPF_UNKNOWN;
     case SDL_PIXELFORMAT_RGB444:
-#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
+#if (DFB_VERSION_ATLEAST(1,2,0))
         return DSPF_RGB444;
 #else
         return DSPF_UNKNOWN;
@@ -543,7 +543,7 @@
         }
 
     }
-#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
+#if (DFB_VERSION_ATLEAST(1,2,0))
     data->render_options = DSRO_NONE;
 #endif
 
@@ -673,7 +673,7 @@
 static int
 DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
 {
-#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
+#if (DFB_VERSION_ATLEAST(1,2,0))
 
     DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
 
@@ -847,7 +847,7 @@
 
     PrepareDraw(renderer);
     /* Use antialiasing when available */
-#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
+#if (DFB_VERSION_ATLEAST(1,2,0))
     SDL_DFB_CHECKERR(data->surface->SetRenderOptions(data->surface,
                                                      DSRO_ANTIALIAS));
 #endif
@@ -961,7 +961,7 @@
                                                          data->blitFlags
                                                          | flags));
 
-#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
+#if (DFB_VERSION_ATLEAST(1,2,0))
         SDL_DFB_CHECKERR(data->surface->SetRenderOptions(data->surface,
                                                          texturedata->
                                                          render_options));