Date: Tue, 1 Nov 2005 02:51:09 +0000
authorRyan C. Gordon
Tue, 01 Nov 2005 04:18:08 +0000
changeset 11654fa705cdecb9
parent 1164 10b3fb28c86b
child 1166 da33b7e6d181
Date: Tue, 1 Nov 2005 02:51:09 +0000
From: Mike Frysinger <vapier@gentoo.org>
To: sdl@libsdl.org
Subject: Re: [SDL] libsdl needs some tweaks for DirectFB 0.9.23

On Fri, Oct 28, 2005 at 01:23:57AM +0000, Mike Frysinger wrote:
> the new release of DirectFB breaks the libsdl DirectRB video module
>
> specifically, this change:
> http://www.directfb.org/index.php/viewcvs.cgi/DirectFB/include/directfb.h.diff?r1=1.266&r2=1.267
>
> but (unless i missed something), it should be trivial to fix (just annoying)
> ... ive done so in Gentoo (also attached):
> http://viewcvs.gentoo.org/media-libs/libsdl/files/libsdl-1.2.9-DirectFB-updates.patch

hmm, i did miss something ... need to include directfb_version.h before trying
to test version defines :)

updated patch attached as well as previous URL
-mike
src/video/directfb/SDL_DirectFB_video.c
     1.1 --- a/src/video/directfb/SDL_DirectFB_video.c	Tue Nov 01 04:14:24 2005 +0000
     1.2 +++ b/src/video/directfb/SDL_DirectFB_video.c	Tue Nov 01 04:18:08 2005 +0000
     1.3 @@ -40,6 +40,7 @@
     1.4  #include <sys/mman.h>
     1.5  
     1.6  #include <directfb.h>
     1.7 +#include <directfb_version.h>
     1.8  
     1.9  #include "SDL.h"
    1.10  #include "SDL_error.h"
    1.11 @@ -376,7 +377,11 @@
    1.12  {
    1.13    int                      i;
    1.14    DFBResult                ret;
    1.15 +#if (DIRECTFB_MAJOR_VERSION == 0) && (DIRECTFB_MINOR_VERSION == 9) && (DIRECTFB_MICRO_VERSION < 23)
    1.16    DFBCardCapabilities      caps;
    1.17 +#else
    1.18 +  DFBGraphicsDeviceDescription caps;
    1.19 +#endif
    1.20    DFBDisplayLayerConfig    dlc;
    1.21    struct DirectFBEnumRect *rect;
    1.22    IDirectFB               *dfb    = NULL;
    1.23 @@ -448,7 +453,11 @@
    1.24  
    1.25  
    1.26    /* Query card capabilities to get the video memory size */
    1.27 +#if (DIRECTFB_MAJOR_VERSION == 0) && (DIRECTFB_MINOR_VERSION == 9) && (DIRECTFB_MICRO_VERSION < 23)
    1.28    dfb->GetCardCapabilities (dfb, &caps);
    1.29 +#else
    1.30 +  dfb->GetDeviceDescription (dfb, &caps);
    1.31 +#endif
    1.32  
    1.33    this->info.wm_available = 1;
    1.34    this->info.hw_available = 1;