Mercurial > sdl-ios-xcode
diff src/video/directfb/SDL_DirectFB_video.h @ 3038:c73a5f8a03d2
Fixed MakeSubSurface compiling issue for DirectFB <= 1.2.0
author | Couriersud <couriersud@arcor.de> |
---|---|
date | Tue, 13 Jan 2009 22:59:02 +0000 |
parents | 490f3e4fe753 |
children | 62d4992e5a92 |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_video.h Tue Jan 13 21:17:38 2009 +0000 +++ b/src/video/directfb/SDL_DirectFB_video.h Tue Jan 13 22:59:02 2009 +0000 @@ -71,9 +71,9 @@ #define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */ #define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */ -#define SDL_DFB_RELEASE(x) do { if ( x ) { x->Release(x); x = NULL; } } while (0) -#define SDL_DFB_FREE(x) do { if ( x ) { SDL_free(x); x = NULL; } } while (0) -#define SDL_DFB_UNLOCK(x) do { if ( x ) { x->Unlock(x); } } while (0) +#define SDL_DFB_RELEASE(x) do { if ( (x) != NULL ) { x->Release(x); x = NULL; } } while (0) +#define SDL_DFB_FREE(x) do { if ( (x) != NULL ) { SDL_free(x); x = NULL; } } while (0) +#define SDL_DFB_UNLOCK(x) do { if ( (x) != NULL ) { x->Unlock(x); } } while (0) #if DEBUG #define SDL_DFB_DEBUG(x...) do { fprintf(LOG_CHANNEL, "%s:", __FUNCTION__); fprintf(LOG_CHANNEL, x); } while (0)