src/video/directfb/SDL_DirectFB_window.c
changeset 6986 bc887debed9b
parent 6885 700f1b25f77f
child 7037 3fedf1f25b94
     1.1 --- a/src/video/directfb/SDL_DirectFB_window.c	Sat Mar 09 09:24:43 2013 -0800
     1.2 +++ b/src/video/directfb/SDL_DirectFB_window.c	Sat Mar 09 10:35:12 2013 -0800
     1.3 @@ -47,6 +47,7 @@
     1.4      int bshaped = 0;
     1.5  
     1.6      SDL_DFB_ALLOC_CLEAR(window->driverdata, sizeof(DFB_WindowData));
     1.7 +    SDL_memset(&desc, 0, sizeof(DFBWindowDescription));
     1.8      windata = (DFB_WindowData *) window->driverdata;
     1.9  
    1.10      windata->is_managed = devdata->has_own_wm;
    1.11 @@ -89,7 +90,12 @@
    1.12      desc.height = windata->size.h;
    1.13      desc.pixelformat = dispdata->pixelformat;
    1.14      desc.surface_caps = DSCAPS_PREMULTIPLIED;
    1.15 -    
    1.16 +#if DIRECTFB_MAJOR_VERSION == 1 && DIRECTFB_MINOR_VERSION >= 4
    1.17 +    if (window->flags & SDL_WINDOW_OPENGL) {
    1.18 +        desc.surface_caps |= DSCAPS_GL;
    1.19 +    }
    1.20 +#endif
    1.21 +
    1.22      /* Create the window. */
    1.23      SDL_DFB_CHECKERR(dispdata->layer->CreateWindow(dispdata->layer, &desc,
    1.24                                                     &windata->dfbwin));
    1.25 @@ -378,7 +384,7 @@
    1.26  }
    1.27  
    1.28  void
    1.29 -DirectFB_SetWindowGrab(_THIS, SDL_Window * window)
    1.30 +DirectFB_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
    1.31  {
    1.32      SDL_DFB_DEVICEDATA(_this);
    1.33      SDL_DFB_WINDOWDATA(window);