src/video/directfb/SDL_DirectFB_window.c
changeset 10025 bf4f8cde1c54
parent 9998 f67cf37e9cd4
child 10737 3406a0f8b041
     1.1 --- a/src/video/directfb/SDL_DirectFB_window.c	Tue Jan 05 02:29:06 2016 -0500
     1.2 +++ b/src/video/directfb/SDL_DirectFB_window.c	Tue Jan 05 02:46:10 2016 -0500
     1.3 @@ -529,4 +529,17 @@
     1.4      return;
     1.5  }
     1.6  
     1.7 +int
     1.8 +DirectFB_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
     1.9 +{
    1.10 +    const Uint8 alpha = (Uint8) ((unsigned int) (opacity * 255.0f));
    1.11 +    SDL_DFB_WINDOWDATA(window);
    1.12 +    SDL_DFB_CHECKERR(windata->dfbwin->SetOpacity(windata->dfbwin, alpha));
    1.13 +    windata->opacity = alpha;
    1.14 +    return 0;
    1.15 +
    1.16 +error:
    1.17 +    return -1;
    1.18 +}
    1.19 +
    1.20  #endif /* SDL_VIDEO_DRIVER_DIRECTFB */