Depend on XRender version 0.10 or above and XFixes version 2.0 or above. Moved these dependency checks into CheckXRender() and CheckXFixes().
This commit is contained in:
parent
1771e1fe4a
commit
09828c4620
1 changed files with 9 additions and 2 deletions
|
@ -204,6 +204,10 @@ CheckXRender(Display *display, int *major, int *minor)
|
|||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
if (major != 0 || minor < 10) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
return SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
@ -230,6 +234,10 @@ CheckXFixes(Display *display, int *major, int *minor)
|
|||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
if (major < 2) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
return SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
@ -397,8 +405,7 @@ X11_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
#ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE
|
||||
if (CheckXDamage(data->display, &major, &minor)) {
|
||||
if (CheckXFixes(data->display, &major, &minor)) {
|
||||
if (major >= 2)
|
||||
data->use_xdamage = SDL_TRUE;
|
||||
data->use_xdamage = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue