Commit 09828c46 authored by Sunny Sachanandani's avatar Sunny Sachanandani

Depend on XRender version 0.10 or above and XFixes version 2.0 or above. Moved...

Depend on XRender version 0.10 or above and XFixes version 2.0 or above. Moved these dependency checks into CheckXRender() and CheckXFixes().
parent 1771e1fe
...@@ -204,6 +204,10 @@ CheckXRender(Display *display, int *major, int *minor) ...@@ -204,6 +204,10 @@ CheckXRender(Display *display, int *major, int *minor)
return SDL_FALSE; return SDL_FALSE;
} }
if (major != 0 || minor < 10) {
return SDL_FALSE;
}
return SDL_TRUE; return SDL_TRUE;
} }
#endif #endif
...@@ -230,6 +234,10 @@ CheckXFixes(Display *display, int *major, int *minor) ...@@ -230,6 +234,10 @@ CheckXFixes(Display *display, int *major, int *minor)
return SDL_FALSE; return SDL_FALSE;
} }
if (major < 2) {
return SDL_FALSE;
}
return SDL_TRUE; return SDL_TRUE;
} }
#endif #endif
...@@ -397,8 +405,7 @@ X11_CreateRenderer(SDL_Window * window, Uint32 flags) ...@@ -397,8 +405,7 @@ X11_CreateRenderer(SDL_Window * window, Uint32 flags)
#ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE
if (CheckXDamage(data->display, &major, &minor)) { if (CheckXDamage(data->display, &major, &minor)) {
if (CheckXFixes(data->display, &major, &minor)) { if (CheckXFixes(data->display, &major, &minor)) {
if (major >= 2) data->use_xdamage = SDL_TRUE;
data->use_xdamage = SDL_TRUE;
} }
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment