Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Depend on XRender version 0.10 or above and XFixes version 2.0 or abo…
Browse files Browse the repository at this point in the history
…ve. Moved these dependency checks into CheckXRender() and CheckXFixes().
  • Loading branch information
sunnyps committed Jul 28, 2010
1 parent a494a4d commit d428ade
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/video/x11/SDL_x11render.c
Expand Up @@ -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
Expand All @@ -230,6 +234,10 @@ CheckXFixes(Display *display, int *major, int *minor)
return SDL_FALSE;
}

if (major < 2) {
return SDL_FALSE;
}

return SDL_TRUE;
}
#endif
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d428ade

Please sign in to comment.