Date: Wed, 26 Nov 2008 19:50:31 +0100
authorSam Lantinga <slouken@libsdl.org>
Wed, 26 Nov 2008 21:59:35 +0000
changeset 27918133d1d278da
parent 2790 8c9fa61a521c
child 2792 c2d9b1aff59f
Date: Wed, 26 Nov 2008 19:50:31 +0100
From: Couriersud
Subject: LPGL and closed-source license / Re: [Bug 607] Texture palette not up

Permission granted to release code under both LPGL and closed-source
commercial license.

Please find attached a minor patch fixing vsync handling in the directfb
driver and containing a small update to README.directfb
README.DirectFB
src/video/directfb/SDL_DirectFB_render.c
     1.1 --- a/README.DirectFB	Wed Nov 26 15:52:00 2008 +0000
     1.2 +++ b/README.DirectFB	Wed Nov 26 21:59:35 2008 +0000
     1.3 @@ -27,6 +27,15 @@
     1.4  sudo make install INSTALL_DIR=/usr/local/dfb_GL
     1.5  ------------------------
     1.6  
     1.7 +/etc/directfbrc
     1.8 +
     1.9 +This file should contain the following two lines to make
    1.10 +your joystick work:
    1.11 +------------------------
    1.12 +disable-module=joystick
    1.13 +disable-module=linux_input
    1.14 +------------------------
    1.15 +
    1.16  To run the SDL - testprograms:
    1.17  
    1.18  export SDL_VIDEODRIVER=directfb
    1.19 @@ -39,7 +48,14 @@
    1.20  
    1.21  export SDL_DIRECTFB_YUV_DIRECT=1
    1.22  
    1.23 -This is disabled by default. It will only support one concurrent 
    1.24 -overlay and may behave strange if not used with SDL_CreateYUvOverlay
    1.25 -from SDLcompat.c. 
    1.26 - 
    1.27 +This is disabled by default. It will only support one 
    1.28 +YUV texture, namely the first. Every other YUV texture will be
    1.29 +rendered in software.
    1.30 +
    1.31 +In addition, you may use 
    1.32 +
    1.33 +export SDL_DIRECTFB_YUV_UNDERLAY=1
    1.34 +
    1.35 +to make the YUV texture an underlay. This will make the cursor to
    1.36 +be shown.
    1.37 +
     2.1 --- a/src/video/directfb/SDL_DirectFB_render.c	Wed Nov 26 15:52:00 2008 +0000
     2.2 +++ b/src/video/directfb/SDL_DirectFB_render.c	Wed Nov 26 21:59:35 2008 +0000
     2.3 @@ -87,7 +87,8 @@
     2.4       "directfb",
     2.5       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY |
     2.6        SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
     2.7 -      SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
     2.8 +      SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD |
     2.9 +      SDL_RENDERER_ACCELERATED),
    2.10       (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
    2.11        SDL_TEXTUREMODULATE_ALPHA),
    2.12       (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
    2.13 @@ -231,9 +232,10 @@
    2.14      data->flipflags = DSFLIP_PIPELINE | DSFLIP_BLIT;
    2.15  
    2.16      if (flags & SDL_RENDERER_PRESENTVSYNC) {
    2.17 -        data->flipflags = DSFLIP_ONSYNC;
    2.18 +        data->flipflags |= DSFLIP_WAITFORSYNC;
    2.19          renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
    2.20 -    }
    2.21 +    } else
    2.22 +        data->flipflags |= DSFLIP_ONSYNC;
    2.23  
    2.24      SDL_DFB_CHECKERR(data->surface->GetCapabilities(data->surface, &scaps));
    2.25      if (scaps & DSCAPS_DOUBLE)
    2.26 @@ -863,7 +865,7 @@
    2.27  
    2.28      /* Send the data to the display */
    2.29      SDL_DFB_CHECKERR(data->surface->
    2.30 -                     Flip(data->surface, NULL, 0 * data->flipflags));
    2.31 +                     Flip(data->surface, NULL, data->flipflags));
    2.32  
    2.33      return;
    2.34    error: