src/video/directfb/SDL_DirectFB_modes.c
author Sam Lantinga
Wed, 18 Jan 2017 12:19:57 -0800
changeset 10821 b0b8395f5cf9
parent 10737 3406a0f8b041
child 11811 5d94cb6b24d3
permissions -rw-r--r--
Removed unused variable
slouken@2737
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@10737
     3
  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
slouken@2737
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@2737
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@2737
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@2737
    20
*/
icculus@8093
    21
#include "../../SDL_internal.h"
slouken@6044
    22
slouken@6044
    23
#if SDL_VIDEO_DRIVER_DIRECTFB
slouken@2737
    24
slouken@2737
    25
#include "SDL_DirectFB_video.h"
slouken@5199
    26
#include "SDL_DirectFB_modes.h"
slouken@2737
    27
slouken@2737
    28
#define DFB_MAX_MODES 200
slouken@2737
    29
slouken@5199
    30
struct screen_callback_t
slouken@2737
    31
{
slouken@2737
    32
    int numscreens;
slouken@2737
    33
    DFBScreenID screenid[DFB_MAX_SCREENS];
slouken@2737
    34
    DFBDisplayLayerID gralayer[DFB_MAX_SCREENS];
slouken@2737
    35
    DFBDisplayLayerID vidlayer[DFB_MAX_SCREENS];
slouken@2737
    36
    int aux;                    /* auxiliary integer for callbacks */
slouken@2737
    37
};
slouken@2737
    38
slouken@2737
    39
struct modes_callback_t
slouken@2737
    40
{
slouken@2737
    41
    int nummodes;
slouken@2737
    42
    SDL_DisplayMode *modelist;
slouken@2737
    43
};
slouken@2737
    44
slouken@2737
    45
static DFBEnumerationResult
slouken@2737
    46
EnumModesCallback(int width, int height, int bpp, void *data)
slouken@2737
    47
{
slouken@2737
    48
    struct modes_callback_t *modedata = (struct modes_callback_t *) data;
slouken@2737
    49
    SDL_DisplayMode mode;
slouken@2737
    50
slouken@2737
    51
    mode.w = width;
slouken@2737
    52
    mode.h = height;
slouken@2737
    53
    mode.refresh_rate = 0;
slouken@2737
    54
    mode.driverdata = NULL;
slouken@2737
    55
    mode.format = SDL_PIXELFORMAT_UNKNOWN;
slouken@2737
    56
slouken@2737
    57
    if (modedata->nummodes < DFB_MAX_MODES) {
slouken@2737
    58
        modedata->modelist[modedata->nummodes++] = mode;
slouken@2737
    59
    }
slouken@2737
    60
slouken@2737
    61
    return DFENUM_OK;
slouken@2737
    62
}
slouken@2737
    63
slouken@2737
    64
static DFBEnumerationResult
slouken@5199
    65
EnumScreensCallback(DFBScreenID screen_id, DFBScreenDescription desc,
slouken@2737
    66
          void *callbackdata)
slouken@2737
    67
{
slouken@5199
    68
    struct screen_callback_t *devdata = (struct screen_callback_t *) callbackdata;
slouken@2737
    69
slouken@2737
    70
    devdata->screenid[devdata->numscreens++] = screen_id;
slouken@2737
    71
    return DFENUM_OK;
slouken@2737
    72
}
slouken@2737
    73
slouken@5199
    74
static DFBEnumerationResult
slouken@5199
    75
EnumLayersCallback(DFBDisplayLayerID layer_id, DFBDisplayLayerDescription desc,
slouken@2737
    76
         void *callbackdata)
slouken@2737
    77
{
slouken@5199
    78
    struct screen_callback_t *devdata = (struct screen_callback_t *) callbackdata;
slouken@2737
    79
slouken@2737
    80
    if (desc.caps & DLCAPS_SURFACE) {
slouken@2737
    81
        if ((desc.type & DLTF_GRAPHICS) && (desc.type & DLTF_VIDEO)) {
slouken@2737
    82
            if (devdata->vidlayer[devdata->aux] == -1)
slouken@2737
    83
                devdata->vidlayer[devdata->aux] = layer_id;
slouken@2737
    84
        } else if (desc.type & DLTF_GRAPHICS) {
slouken@2737
    85
            if (devdata->gralayer[devdata->aux] == -1)
slouken@2737
    86
                devdata->gralayer[devdata->aux] = layer_id;
slouken@2737
    87
        }
slouken@2737
    88
    }
slouken@2737
    89
    return DFENUM_OK;
slouken@2737
    90
}
slouken@2737
    91
slouken@2737
    92
static void
slouken@3500
    93
CheckSetDisplayMode(_THIS, SDL_VideoDisplay * display, DFB_DisplayData * data, SDL_DisplayMode * mode)
slouken@2737
    94
{
slouken@2737
    95
    SDL_DFB_DEVICEDATA(_this);
slouken@2737
    96
    DFBDisplayLayerConfig config;
slouken@2737
    97
    DFBDisplayLayerConfigFlags failed;
slouken@2737
    98
couriersud@3023
    99
    SDL_DFB_CHECKERR(data->layer->SetCooperativeLevel(data->layer,
couriersud@3023
   100
                                                      DLSCL_ADMINISTRATIVE));
slouken@2737
   101
    config.width = mode->w;
slouken@2737
   102
    config.height = mode->h;
slouken@5199
   103
    config.pixelformat = DirectFB_SDLToDFBPixelFormat(mode->format);
slouken@2737
   104
    config.flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT;
slouken@2737
   105
    if (devdata->use_yuv_underlays) {
slouken@2737
   106
        config.flags |= DLCONF_OPTIONS;
slouken@2737
   107
        config.options = DLOP_ALPHACHANNEL;
slouken@2737
   108
    }
slouken@2737
   109
    failed = 0;
slouken@2737
   110
    data->layer->TestConfiguration(data->layer, &config, &failed);
couriersud@3023
   111
    SDL_DFB_CHECKERR(data->layer->SetCooperativeLevel(data->layer,
couriersud@3023
   112
                                                      DLSCL_SHARED));
slouken@2737
   113
    if (failed == 0)
slouken@5199
   114
    {
slouken@3500
   115
        SDL_AddDisplayMode(display, mode);
slouken@5199
   116
        SDL_DFB_LOG("Mode %d x %d Added\n", mode->w, mode->h);
slouken@5199
   117
    }
slouken@2737
   118
    else
slouken@4636
   119
        SDL_DFB_ERR("Mode %d x %d not available: %x\n", mode->w,
couriersud@3023
   120
                      mode->h, failed);
slouken@2737
   121
slouken@2737
   122
    return;
slouken@2737
   123
  error:
slouken@2737
   124
    return;
slouken@2737
   125
}
slouken@2737
   126
slouken@5199
   127
slouken@5199
   128
void
slouken@5199
   129
DirectFB_SetContext(_THIS, SDL_Window *window)
slouken@5199
   130
{
slouken@5199
   131
#if (DFB_VERSION_ATLEAST(1,0,0))
slouken@5199
   132
    /* FIXME: does not work on 1.0/1.2 with radeon driver
slouken@5199
   133
     *        the approach did work with the matrox driver
slouken@5199
   134
     *        This has simply no effect.
slouken@5199
   135
     */
slouken@5199
   136
slouken@5246
   137
    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
slouken@5199
   138
    DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
slouken@5199
   139
slouken@7191
   140
    /* FIXME: should we handle the error */
slouken@5199
   141
    if (dispdata->vidIDinuse)
slouken@5199
   142
        SDL_DFB_CHECK(dispdata->vidlayer->SwitchContext(dispdata->vidlayer,
slouken@5199
   143
                                                           DFB_TRUE));
slouken@5199
   144
#endif
slouken@5199
   145
}
slouken@5199
   146
slouken@2737
   147
void
slouken@2737
   148
DirectFB_InitModes(_THIS)
slouken@2737
   149
{
slouken@2737
   150
    SDL_DFB_DEVICEDATA(_this);
slouken@2737
   151
    IDirectFBDisplayLayer *layer = NULL;
slouken@2737
   152
    SDL_VideoDisplay display;
couriersud@3023
   153
    DFB_DisplayData *dispdata = NULL;
slouken@2737
   154
    SDL_DisplayMode mode;
slouken@2737
   155
    DFBGraphicsDeviceDescription caps;
slouken@2737
   156
    DFBDisplayLayerConfig dlc;
slouken@5199
   157
    struct screen_callback_t *screencbdata;
slouken@2737
   158
slouken@2737
   159
    int tcw[DFB_MAX_SCREENS];
slouken@2737
   160
    int tch[DFB_MAX_SCREENS];
slouken@2737
   161
    int i;
slouken@2737
   162
    DFBResult ret;
slouken@2737
   163
slouken@5199
   164
    SDL_DFB_ALLOC_CLEAR(screencbdata, sizeof(*screencbdata));
slouken@2737
   165
slouken@2737
   166
    screencbdata->numscreens = 0;
slouken@2737
   167
slouken@2737
   168
    for (i = 0; i < DFB_MAX_SCREENS; i++) {
slouken@2737
   169
        screencbdata->gralayer[i] = -1;
slouken@2737
   170
        screencbdata->vidlayer[i] = -1;
slouken@2737
   171
    }
slouken@2737
   172
slouken@5199
   173
    SDL_DFB_CHECKERR(devdata->dfb->EnumScreens(devdata->dfb, &EnumScreensCallback,
couriersud@3023
   174
                                               screencbdata));
slouken@2737
   175
slouken@2737
   176
    for (i = 0; i < screencbdata->numscreens; i++) {
slouken@2737
   177
        IDirectFBScreen *screen;
slouken@2737
   178
couriersud@3023
   179
        SDL_DFB_CHECKERR(devdata->dfb->GetScreen(devdata->dfb,
couriersud@3023
   180
                                                 screencbdata->screenid
couriersud@3023
   181
                                                 [i], &screen));
slouken@2737
   182
slouken@2737
   183
        screencbdata->aux = i;
slouken@5199
   184
        SDL_DFB_CHECKERR(screen->EnumDisplayLayers(screen, &EnumLayersCallback,
couriersud@3023
   185
                                                   screencbdata));
slouken@2737
   186
        screen->GetSize(screen, &tcw[i], &tch[i]);
slouken@5199
   187
slouken@2737
   188
        screen->Release(screen);
slouken@2737
   189
    }
slouken@2737
   190
slouken@2737
   191
    /* Query card capabilities */
slouken@2737
   192
slouken@2737
   193
    devdata->dfb->GetDeviceDescription(devdata->dfb, &caps);
slouken@2737
   194
slouken@2737
   195
    for (i = 0; i < screencbdata->numscreens; i++) {
couriersud@3023
   196
        SDL_DFB_CHECKERR(devdata->dfb->GetDisplayLayer(devdata->dfb,
couriersud@3023
   197
                                                       screencbdata->gralayer
couriersud@3023
   198
                                                       [i], &layer));
slouken@2737
   199
couriersud@3023
   200
        SDL_DFB_CHECKERR(layer->SetCooperativeLevel(layer,
couriersud@3023
   201
                                                    DLSCL_ADMINISTRATIVE));
slouken@2737
   202
        layer->EnableCursor(layer, 1);
slouken@2737
   203
        SDL_DFB_CHECKERR(layer->SetCursorOpacity(layer, 0xC0));
slouken@2737
   204
slouken@2737
   205
        if (devdata->use_yuv_underlays) {
slouken@2737
   206
            dlc.flags = DLCONF_PIXELFORMAT | DLCONF_OPTIONS;
slouken@2737
   207
            dlc.pixelformat = DSPF_ARGB;
slouken@2737
   208
            dlc.options = DLOP_ALPHACHANNEL;
slouken@2737
   209
slouken@5199
   210
            ret = layer->SetConfiguration(layer, &dlc);
slouken@4636
   211
            if (ret != DFB_OK) {
slouken@2737
   212
                /* try AiRGB if the previous failed */
slouken@2737
   213
                dlc.pixelformat = DSPF_AiRGB;
slouken@4636
   214
                SDL_DFB_CHECKERR(layer->SetConfiguration(layer, &dlc));
slouken@2737
   215
            }
slouken@2737
   216
        }
slouken@2737
   217
slouken@2737
   218
        /* Query layer configuration to determine the current mode and pixelformat */
slouken@2815
   219
        dlc.flags = DLCONF_ALL;
slouken@4636
   220
        SDL_DFB_CHECKERR(layer->GetConfiguration(layer, &dlc));
slouken@2737
   221
slouken@5199
   222
        mode.format = DirectFB_DFBToSDLPixelFormat(dlc.pixelformat);
slouken@7191
   223
slouken@4636
   224
        if (mode.format == SDL_PIXELFORMAT_UNKNOWN) {
slouken@2737
   225
            SDL_DFB_ERR("Unknown dfb pixelformat %x !\n", dlc.pixelformat);
slouken@2737
   226
            goto error;
slouken@2737
   227
        }
slouken@2737
   228
slouken@2737
   229
        mode.w = dlc.width;
slouken@2737
   230
        mode.h = dlc.height;
slouken@2737
   231
        mode.refresh_rate = 0;
slouken@2737
   232
        mode.driverdata = NULL;
slouken@2737
   233
slouken@5199
   234
        SDL_DFB_ALLOC_CLEAR(dispdata, sizeof(*dispdata));
slouken@2737
   235
slouken@2737
   236
        dispdata->layer = layer;
slouken@2737
   237
        dispdata->pixelformat = dlc.pixelformat;
slouken@2737
   238
        dispdata->cw = tcw[i];
slouken@2737
   239
        dispdata->ch = tch[i];
slouken@2737
   240
slouken@2737
   241
        /* YUV - Video layer */
slouken@2737
   242
slouken@2737
   243
        dispdata->vidID = screencbdata->vidlayer[i];
slouken@2737
   244
        dispdata->vidIDinuse = 0;
slouken@2737
   245
slouken@2737
   246
        SDL_zero(display);
slouken@2737
   247
slouken@2737
   248
        display.desktop_mode = mode;
slouken@2737
   249
        display.current_mode = mode;
slouken@2737
   250
        display.driverdata = dispdata;
slouken@2737
   251
couriersud@3037
   252
#if (DFB_VERSION_ATLEAST(1,2,0))
slouken@2841
   253
        dlc.flags =
slouken@2841
   254
            DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT |
slouken@2841
   255
            DLCONF_OPTIONS;
slouken@2841
   256
        ret = layer->SetConfiguration(layer, &dlc);
slouken@2841
   257
#endif
slouken@2815
   258
slouken@2815
   259
        SDL_DFB_CHECKERR(layer->SetCooperativeLevel(layer, DLSCL_SHARED));
slouken@2815
   260
slouken@2737
   261
        SDL_AddVideoDisplay(&display);
slouken@2737
   262
    }
slouken@2737
   263
    SDL_DFB_FREE(screencbdata);
slouken@2737
   264
    return;
slouken@2737
   265
  error:
slouken@2737
   266
    /* FIXME: Cleanup not complete, Free existing displays */
slouken@2737
   267
    SDL_DFB_FREE(dispdata);
slouken@2737
   268
    SDL_DFB_RELEASE(layer);
slouken@2737
   269
    return;
slouken@2737
   270
}
slouken@2737
   271
slouken@2737
   272
void
slouken@3500
   273
DirectFB_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
slouken@2737
   274
{
slouken@2737
   275
    SDL_DFB_DEVICEDATA(_this);
slouken@3500
   276
    DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
slouken@2737
   277
    SDL_DisplayMode mode;
slouken@2737
   278
    struct modes_callback_t data;
slouken@2737
   279
    int i;
slouken@2737
   280
slouken@2737
   281
    data.nummodes = 0;
slouken@2737
   282
    /* Enumerate the available fullscreen modes */
slouken@2737
   283
    SDL_DFB_CALLOC(data.modelist, DFB_MAX_MODES, sizeof(SDL_DisplayMode));
couriersud@3023
   284
    SDL_DFB_CHECKERR(devdata->dfb->EnumVideoModes(devdata->dfb,
couriersud@3023
   285
                                                  EnumModesCallback, &data));
slouken@2737
   286
slouken@2737
   287
    for (i = 0; i < data.nummodes; ++i) {
slouken@2737
   288
        mode = data.modelist[i];
slouken@2737
   289
slouken@2737
   290
        mode.format = SDL_PIXELFORMAT_ARGB8888;
slouken@3500
   291
        CheckSetDisplayMode(_this, display, dispdata, &mode);
slouken@2737
   292
        mode.format = SDL_PIXELFORMAT_RGB888;
slouken@3500
   293
        CheckSetDisplayMode(_this, display, dispdata, &mode);
slouken@2737
   294
        mode.format = SDL_PIXELFORMAT_RGB24;
slouken@3500
   295
        CheckSetDisplayMode(_this, display, dispdata, &mode);
slouken@2737
   296
        mode.format = SDL_PIXELFORMAT_RGB565;
slouken@3500
   297
        CheckSetDisplayMode(_this, display, dispdata, &mode);
slouken@2737
   298
        mode.format = SDL_PIXELFORMAT_INDEX8;
slouken@3500
   299
        CheckSetDisplayMode(_this, display, dispdata, &mode);
slouken@2737
   300
    }
slouken@3500
   301
slouken@2737
   302
    SDL_DFB_FREE(data.modelist);
couriersud@3640
   303
error:
slouken@2737
   304
    return;
slouken@2737
   305
}
slouken@2737
   306
slouken@2737
   307
int
slouken@3500
   308
DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
slouken@2737
   309
{
slouken@2737
   310
    /*
slouken@2737
   311
     * FIXME: video mode switch is currently broken for 1.2.0
slouken@7191
   312
     *
slouken@2737
   313
     */
slouken@2737
   314
slouken@2737
   315
    SDL_DFB_DEVICEDATA(_this);
slouken@3500
   316
    DFB_DisplayData *data = (DFB_DisplayData *) display->driverdata;
slouken@2737
   317
    DFBDisplayLayerConfig config, rconfig;
slouken@2737
   318
    DFBDisplayLayerConfigFlags fail = 0;
slouken@2737
   319
couriersud@3023
   320
    SDL_DFB_CHECKERR(data->layer->SetCooperativeLevel(data->layer,
couriersud@3023
   321
                                                      DLSCL_ADMINISTRATIVE));
slouken@2737
   322
slouken@2737
   323
    SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &config));
slouken@2737
   324
    config.flags = DLCONF_WIDTH | DLCONF_HEIGHT;
slouken@2737
   325
    if (mode->format != SDL_PIXELFORMAT_UNKNOWN) {
slouken@2737
   326
        config.flags |= DLCONF_PIXELFORMAT;
slouken@5199
   327
        config.pixelformat = DirectFB_SDLToDFBPixelFormat(mode->format);
slouken@2737
   328
        data->pixelformat = config.pixelformat;
slouken@2737
   329
    }
slouken@2737
   330
    config.width = mode->w;
slouken@2737
   331
    config.height = mode->h;
slouken@2737
   332
slouken@2737
   333
    if (devdata->use_yuv_underlays) {
slouken@2737
   334
        config.flags |= DLCONF_OPTIONS;
slouken@2737
   335
        config.options = DLOP_ALPHACHANNEL;
slouken@2737
   336
    }
slouken@2737
   337
slouken@2737
   338
    data->layer->TestConfiguration(data->layer, &config, &fail);
slouken@2737
   339
slouken@2737
   340
    if (fail &
couriersud@3023
   341
        (DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT |
couriersud@3023
   342
         DLCONF_OPTIONS)) {
slouken@2737
   343
        SDL_DFB_ERR("Error setting mode %dx%d-%x\n", mode->w, mode->h,
slouken@2737
   344
                    mode->format);
slouken@2737
   345
        return -1;
slouken@2737
   346
    }
slouken@2737
   347
slouken@2737
   348
    config.flags &= ~fail;
slouken@2737
   349
    SDL_DFB_CHECKERR(data->layer->SetConfiguration(data->layer, &config));
couriersud@3037
   350
#if (DFB_VERSION_ATLEAST(1,2,0))
slouken@2815
   351
    /* Need to call this twice ! */
slouken@2815
   352
    SDL_DFB_CHECKERR(data->layer->SetConfiguration(data->layer, &config));
slouken@2815
   353
#endif
slouken@2737
   354
slouken@2737
   355
    /* Double check */
slouken@2737
   356
    SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &rconfig));
couriersud@3023
   357
    SDL_DFB_CHECKERR(data->
couriersud@3023
   358
                     layer->SetCooperativeLevel(data->layer, DLSCL_SHARED));
slouken@2737
   359
couriersud@3023
   360
    if ((config.width != rconfig.width) || (config.height != rconfig.height)
couriersud@3023
   361
        || ((mode->format != SDL_PIXELFORMAT_UNKNOWN)
couriersud@3023
   362
            && (config.pixelformat != rconfig.pixelformat))) {
slouken@2737
   363
        SDL_DFB_ERR("Error setting mode %dx%d-%x\n", mode->w, mode->h,
slouken@2737
   364
                    mode->format);
slouken@2737
   365
        return -1;
slouken@2737
   366
    }
slouken@2841
   367
slouken@2737
   368
    data->pixelformat = rconfig.pixelformat;
slouken@2737
   369
    data->cw = config.width;
slouken@2737
   370
    data->ch = config.height;
slouken@3500
   371
    display->current_mode = *mode;
slouken@2737
   372
slouken@2737
   373
    return 0;
slouken@2737
   374
  error:
slouken@2737
   375
    return -1;
slouken@2737
   376
}
slouken@2737
   377
slouken@2737
   378
void
slouken@2737
   379
DirectFB_QuitModes(_THIS)
slouken@2737
   380
{
slouken@2737
   381
    SDL_DisplayMode tmode;
slouken@2737
   382
    int i;
slouken@2737
   383
slouken@3500
   384
    for (i = 0; i < _this->num_displays; ++i) {
slouken@3500
   385
        SDL_VideoDisplay *display = &_this->displays[i];
slouken@3500
   386
        DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
slouken@2737
   387
slouken@5488
   388
        SDL_GetDesktopDisplayMode(i, &tmode);
slouken@3500
   389
        tmode.format = SDL_PIXELFORMAT_UNKNOWN;
slouken@3500
   390
        DirectFB_SetDisplayMode(_this, display, &tmode);
slouken@2737
   391
slouken@5488
   392
        SDL_GetDesktopDisplayMode(i, &tmode);
slouken@3500
   393
        DirectFB_SetDisplayMode(_this, display, &tmode);
slouken@2737
   394
slouken@2737
   395
        if (dispdata->layer) {
couriersud@3023
   396
            SDL_DFB_CHECK(dispdata->
couriersud@3023
   397
                          layer->SetCooperativeLevel(dispdata->layer,
couriersud@3023
   398
                                                     DLSCL_ADMINISTRATIVE));
couriersud@3023
   399
            SDL_DFB_CHECK(dispdata->
couriersud@3023
   400
                          layer->SetCursorOpacity(dispdata->layer, 0x00));
couriersud@3023
   401
            SDL_DFB_CHECK(dispdata->
couriersud@3023
   402
                          layer->SetCooperativeLevel(dispdata->layer,
couriersud@3023
   403
                                                     DLSCL_SHARED));
slouken@2737
   404
        }
slouken@2737
   405
slouken@2737
   406
        SDL_DFB_RELEASE(dispdata->layer);
slouken@2737
   407
        SDL_DFB_RELEASE(dispdata->vidlayer);
slouken@2737
   408
slouken@2737
   409
    }
slouken@2737
   410
}
slouken@2737
   411
slouken@6044
   412
#endif /* SDL_VIDEO_DRIVER_DIRECTFB */
slouken@6044
   413
slouken@2737
   414
/* vi: set ts=4 sw=4 expandtab: */