Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11render.c @ 4604:d7535d7a40ea
Integrate XFixes and XDamage into the build system.
author | Sunny Sachanandani <sunnysachanandani@gmail.com> |
---|---|
date | Mon, 19 Jul 2010 20:05:53 +0530 |
parents | dffa432f0e2b |
children | 0b3a509c53a0 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11render.c Mon Jul 19 18:57:02 2010 +0530 +++ b/src/video/x11/SDL_x11render.c Mon Jul 19 20:05:53 2010 +0530 @@ -31,11 +31,6 @@ #include "../SDL_pixels_c.h" #include "../SDL_yuv_sw_c.h" -#include <X11/extensions/Xdamage.h> -#include <X11/extensions/Xfixes.h> - -#define SDL_VIDEO_DRIVER_X11_XDAMAGE - /* X11 renderer implementation */ static SDL_Renderer *X11_CreateRenderer(SDL_Window * window, Uint32 flags); @@ -271,21 +266,23 @@ } #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE if (data->use_xrender) { + if(SDL_X11_HAVE_XDAMAGE && SDL_X11_HAVE_XFIXES) { /* Query XDamage and XFixes */ - if(XDamageQueryExtension(data->display, - &event_basep, - &error_basep) == True && - (XFixesQueryExtension(data->display, - &event_basep, - &error_basep) == True)) { - int major_version, minor_version; - XFixesQueryVersion(data->display, - &major_version, - &minor_version); - /* Only XFixes v 2 or greater - * Required for XFixesSetPictureClipRegion() */ - if(major_version >= 2) - data->use_xdamage = SDL_TRUE; + if(XDamageQueryExtension(data->display, + &event_basep, + &error_basep) == True && + (XFixesQueryExtension(data->display, + &event_basep, + &error_basep) == True)) { + int major_version, minor_version; + XFixesQueryVersion(data->display, + &major_version, + &minor_version); + /* Only XFixes v 2 or greater + * Required for XFixesSetPictureClipRegion() */ + if(major_version >= 2) + data->use_xdamage = SDL_TRUE; + } } #endif /* Find the PictFormat from the visual.