comparison src/video/directfb/SDL_DirectFB_video.h @ 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
comparison
equal deleted inserted replaced
3036:76a1692fcec5 3037:490f3e4fe753
32 #include "SDL_mouse.h" 32 #include "SDL_mouse.h"
33 33
34 #define DEBUG 0 34 #define DEBUG 0
35 #define LOG_CHANNEL stdout 35 #define LOG_CHANNEL stdout
36 36
37 #if (DIRECTFB_MAJOR_VERSION < 1) 37 #define DFB_VERSIONNUM(X, Y, Z) \
38 #error "SDL_DIRECTFB: Please compile against libdirectfb version >= 1.0.0" 38 ((X)*1000 + (Y)*100 + (Z))
39 #endif
40 39
41 #if (DIRECTFB_MAJOR_VERSION >= 1) && (DIRECTFB_MINOR_VERSION >= 0) && (DIRECTFB_MICRO_VERSION >= 0 ) 40 #define DFB_COMPILEDVERSION \
42 #define SDL_DIRECTFB_OPENGL 1 41 DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION)
43 #include <directfbgl.h> 42
43 #define DFB_VERSION_ATLEAST(X, Y, Z) \
44 (DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z))
45
46 #if (DFB_VERSION_ATLEAST(1,0,0))
47 #define SDL_DIRECTFB_OPENGL 1
48 #include <directfbgl.h>
49 #else
50 #error "SDL_DIRECTFB: Please compile against libdirectfb version >= 1.0.0"
44 #endif 51 #endif
45 52
46 #if SDL_DIRECTFB_OPENGL 53 #if SDL_DIRECTFB_OPENGL
47 #include "SDL_loadso.h" 54 #include "SDL_loadso.h"
48 #endif 55 #endif