Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11render.c @ 4623:10175d54adf4
Depend on XRender version 0.10 or above and XFixes version 2.0 or above. Moved these dependency checks into CheckXRender() and CheckXFixes().
author | Sunny Sachanandani <sunnysachanandani@gmail.com> |
---|---|
date | Wed, 28 Jul 2010 15:33:28 +0530 |
parents | 453712fd2016 |
children | b70b99ab75b8 |
comparison
equal
deleted
inserted
replaced
4622:453712fd2016 | 4623:10175d54adf4 |
---|---|
202 | 202 |
203 if (!XRenderQueryVersion(display, major, minor)) { | 203 if (!XRenderQueryVersion(display, major, minor)) { |
204 return SDL_FALSE; | 204 return SDL_FALSE; |
205 } | 205 } |
206 | 206 |
207 if (major != 0 || minor < 10) { | |
208 return SDL_FALSE; | |
209 } | |
210 | |
207 return SDL_TRUE; | 211 return SDL_TRUE; |
208 } | 212 } |
209 #endif | 213 #endif |
210 | 214 |
211 #ifdef SDL_VIDEO_DRIVER_X11_XFIXES | 215 #ifdef SDL_VIDEO_DRIVER_X11_XFIXES |
225 if (!SDL_X11_HAVE_XFIXES) { | 229 if (!SDL_X11_HAVE_XFIXES) { |
226 return SDL_FALSE; | 230 return SDL_FALSE; |
227 } | 231 } |
228 | 232 |
229 if (!XFixesQueryVersion(display, major, minor)) { | 233 if (!XFixesQueryVersion(display, major, minor)) { |
234 return SDL_FALSE; | |
235 } | |
236 | |
237 if (major < 2) { | |
230 return SDL_FALSE; | 238 return SDL_FALSE; |
231 } | 239 } |
232 | 240 |
233 return SDL_TRUE; | 241 return SDL_TRUE; |
234 } | 242 } |
395 int major, minor; | 403 int major, minor; |
396 data->use_xrender = CheckXRender(data->display, &major, &minor); | 404 data->use_xrender = CheckXRender(data->display, &major, &minor); |
397 #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE | 405 #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE |
398 if (CheckXDamage(data->display, &major, &minor)) { | 406 if (CheckXDamage(data->display, &major, &minor)) { |
399 if (CheckXFixes(data->display, &major, &minor)) { | 407 if (CheckXFixes(data->display, &major, &minor)) { |
400 if (major >= 2) | 408 data->use_xdamage = SDL_TRUE; |
401 data->use_xdamage = SDL_TRUE; | |
402 } | 409 } |
403 } | 410 } |
404 #endif | 411 #endif |
405 if (data->use_xrender) { | 412 if (data->use_xrender) { |
406 /* Find the PictFormat from the visual. | 413 /* Find the PictFormat from the visual. |