[MPlayer-dev-eng] [PATCH 2/2] build: Update SDL test to check for new features

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun May 13 14:50:44 CEST 2012


On 12 May 2012, at 21:36, Alexander Strasser <eclipse7 at gmx.net> wrote:
>  Since we are using SDL_VideoInfo() now to get current_w
> and current_h, we must check for their existence in our
> configure script to avoid build failures on systems with an
> outdated SDL.
> ---
> configure |    7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/configure b/configure
> index 13e1683..a519de0 100755
> --- a/configure
> +++ b/configure
> @@ -5026,7 +5026,14 @@ if test "$_sdl" = auto || test "$_sdl" = yes ; then
> #undef main
> #endif
> int main(int argc, char *argv[]) {
> +  int tmp;
> +  const SDL_VideoInfo *vi;
> +
>   SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE);
> +  vi = SDL_GetVideoInfo();
> +  tmp = vi->current_w;
> +  tmp = vi->current_h;

Seems a bit like overkill to me.
Any reason to believe that just adding a call to GetVideoInfo (without any of the extra variables) wouldn't be good enough?
Alternatively that call could be put under an SDL_VERSION ifdef or such...


More information about the MPlayer-dev-eng mailing list