src/video/directfb/SDL_DirectFB_modes.c
author Sam Lantinga <slouken@libsdl.org>
Sat, 05 Feb 2011 16:07:10 -0800
changeset 5199 164f20ba08eb
parent 4636 b196d2758026
child 5246 58265e606e4e
permissions -rw-r--r--
Updated the DirectFB support, from Couriersud

attached is a working directfb driver diff which works with the current
changes. There are a number of changes around it as well, e.g.
configure.in.

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