Mercurial > sdl-ios-xcode
diff src/video/directfb/SDL_DirectFB_video.c @ 2735:204be4fc2726
Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 27 Aug 2008 15:10:03 +0000 |
parents | 91f1706b27be |
children | 140a7edcf2bd |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_video.c Wed Aug 27 13:37:19 2008 +0000 +++ b/src/video/directfb/SDL_DirectFB_video.c Wed Aug 27 15:10:03 2008 +0000 @@ -314,8 +314,8 @@ SDL_DFB_CHECKERR(dfb->GetScreen(dfb, devdata->screenid[i], &screen)); devdata->aux = i; - SDL_DFB_CHECKERR(screen-> - EnumDisplayLayers(screen, &cbLayers, devdata)); + SDL_DFB_CHECKERR(screen->EnumDisplayLayers + (screen, &cbLayers, devdata)); #if (DIRECTFB_MAJOR_VERSION >= 1) screen->GetSize(screen, &tcw[i], &tch[i]); #else @@ -338,12 +338,12 @@ for (i = 0; i < devdata->numscreens; i++) { //SDL_DFB_CHECKERR( dfb->GetDisplayLayer (dfb, DLID_PRIMARY, &layer) ); - SDL_DFB_CHECKERR(dfb-> - GetDisplayLayer(dfb, devdata->gralayer[i], &layer)); + SDL_DFB_CHECKERR(dfb->GetDisplayLayer + (dfb, devdata->gralayer[i], &layer)); //SDL_DFB_CHECKERR( dfb->CreateInputEventBuffer (dfb, DICAPS_ALL, DFB_FALSE, &events) ); - SDL_DFB_CHECKERR(layer-> - SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE)); + SDL_DFB_CHECKERR(layer->SetCooperativeLevel + (layer, DLSCL_ADMINISTRATIVE)); layer->EnableCursor(layer, 1); SDL_DFB_CHECKERR(layer->SetCursorOpacity(layer, 0xC0)); SDL_DFB_CHECKERR(layer->SetCooperativeLevel(layer, DLSCL_SHARED)); @@ -379,8 +379,8 @@ /* Enumerate the available fullscreen modes */ SDL_DFB_CALLOC(dispdata->modelist, DFB_MAX_MODES, sizeof(SDL_DisplayMode)); - SDL_DFB_CHECKERR(dfb-> - EnumVideoModes(dfb, EnumModesCallback, &display)); + SDL_DFB_CHECKERR(dfb->EnumVideoModes + (dfb, EnumModesCallback, &display)); SDL_AddVideoDisplay(&display); } @@ -433,13 +433,14 @@ DFB_DisplayData *dispdata = (DFB_DisplayData *) _this->displays[i].driverdata; if (dispdata->layer) { - SDL_DFB_CHECK(dispdata->layer-> - SetCooperativeLevel(dispdata->layer, - DLSCL_ADMINISTRATIVE)); - SDL_DFB_CHECK(dispdata->layer-> - SetCursorOpacity(dispdata->layer, 0x00)); - SDL_DFB_CHECK(dispdata->layer-> - SetCooperativeLevel(dispdata->layer, DLSCL_SHARED)); + SDL_DFB_CHECK(dispdata-> + layer->SetCooperativeLevel(dispdata->layer, + DLSCL_ADMINISTRATIVE)); + SDL_DFB_CHECK(dispdata-> + layer->SetCursorOpacity(dispdata->layer, 0x00)); + SDL_DFB_CHECK(dispdata-> + layer->SetCooperativeLevel(dispdata->layer, + DLSCL_SHARED)); } SDL_DFB_RELEASE(dispdata->layer); @@ -578,8 +579,8 @@ DFBResult ret; DFB_WindowData *win; - SDL_DFB_CHECKERR(data->layer-> - SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE)); + SDL_DFB_CHECKERR(data->layer->SetCooperativeLevel(data->layer, + DLSCL_ADMINISTRATIVE)); SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &config)); config.flags = DLCONF_WIDTH | DLCONF_HEIGHT; // | DLCONF_BUFFERMODE; @@ -604,8 +605,8 @@ SDL_DFB_DEBUG("Trace\n"); config.flags &= ~fail; SDL_DFB_CHECKERR(data->layer->SetConfiguration(data->layer, &config)); - SDL_DFB_CHECKERR(data->layer-> - SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE)); + SDL_DFB_CHECKERR(data->layer->SetCooperativeLevel(data->layer, + DLSCL_ADMINISTRATIVE)); /* Double check */ SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &rconfig)); @@ -674,11 +675,11 @@ SDL_DFB_CALLOC(window->driverdata, 1, sizeof(DFB_WindowData)); windata = (DFB_WindowData *) window->driverdata; - SDL_DFB_CHECKERR(devdata->dfb-> - SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL)); - SDL_DFB_CHECKERR(dispdata->layer-> - SetCooperativeLevel(dispdata->layer, - DLSCL_ADMINISTRATIVE)); + SDL_DFB_CHECKERR(devdata-> + dfb->SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL)); + SDL_DFB_CHECKERR(dispdata-> + layer->SetCooperativeLevel(dispdata->layer, + DLSCL_ADMINISTRATIVE)); /* Fill the window description. */ if (window->x == SDL_WINDOWPOS_CENTERED) { @@ -725,8 +726,8 @@ desc.surface_caps = DSCAPS_DOUBLE | DSCAPS_TRIPLE / DSCAPS_PREMULTIPLIED; /* Create the window. */ - SDL_DFB_CHECKERR(dispdata->layer-> - CreateWindow(dispdata->layer, &desc, &windata->window)); + SDL_DFB_CHECKERR(dispdata->layer->CreateWindow(dispdata->layer, &desc, + &windata->window)); windata->window->GetOptions(windata->window, &wopts); #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0) @@ -744,12 +745,13 @@ windata->window->SetOptions(windata->window, wopts); /* Get the window's surface. */ - SDL_DFB_CHECKERR(windata->window-> - GetSurface(windata->window, &windata->surface)); + SDL_DFB_CHECKERR(windata-> + window->GetSurface(windata->window, &windata->surface)); windata->window->SetOpacity(windata->window, 0xFF); - SDL_DFB_CHECKERR(windata->window-> - CreateEventBuffer(windata->window, - &(windata->eventbuffer))); + SDL_DFB_CHECKERR(windata->window->CreateEventBuffer(windata->window, + & + (windata-> + eventbuffer))); SDL_DFB_CHECKERR(windata->window-> EnableEvents(windata->window, DWET_POSITION | DWET_SIZE | DWET_CLOSE | @@ -812,6 +814,7 @@ //return -1; } + static void DirectFB_SetWindowPosition(_THIS, SDL_Window * window) { @@ -886,6 +889,7 @@ windata->window->SetOpacity(windata->window, 0); } + static void DirectFB_RaiseWindow(_THIS, SDL_Window * window) { @@ -907,6 +911,7 @@ SDL_Unsupported(); } + static void DirectFB_MinimizeWindow(_THIS, SDL_Window * window) { @@ -928,6 +933,7 @@ SDL_Unsupported(); } + static void DirectFB_SetWindowGrab(_THIS, SDL_Window * window) { @@ -1156,8 +1162,8 @@ devdata->glFlush(); SDL_DFB_CHECKERR(windata->gl_context->Unlock(windata->gl_context)); - SDL_DFB_CHECKERR(windata->surface-> - Flip(windata->surface, ®ion, DSFLIP_ONSYNC)); + SDL_DFB_CHECKERR(windata-> + surface->Flip(windata->surface, ®ion, DSFLIP_ONSYNC)); SDL_DFB_CHECKERR(windata->gl_context->Lock(windata->gl_context)); return;