diff src/video/directfb/SDL_DirectFB_render.c @ 3013:8cc00819c8d6

Reverted Bob's indent checkin
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Jan 2009 21:50:26 +0000
parents 8f4ed5ec2b06
children d72a0dd80e8b
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_render.c	Sat Jan 10 18:32:24 2009 +0000
+++ b/src/video/directfb/SDL_DirectFB_render.c	Sat Jan 10 21:50:26 2009 +0000
@@ -418,12 +418,12 @@
         int cw, ch;
         int ret;
 
-        SDL_DFB_CHECKERR(windata->
-                         surface->GetSize(windata->surface, &cw, &ch));
+        SDL_DFB_CHECKERR(windata->surface->
+                         GetSize(windata->surface, &cw, &ch));
         if (cw != window->w || ch != window->h)
-            SDL_DFB_CHECKERR(windata->
-                             window->ResizeSurface(windata->window, window->w,
-                                                   window->h));
+            SDL_DFB_CHECKERR(windata->window->
+                             ResizeSurface(windata->window, window->w,
+                                           window->h));
     }
     return 0;
   error:
@@ -462,24 +462,22 @@
         layconf.pixelformat = SDLToDFBPixelFormat(data->format);
         layconf.surface_caps = DSCAPS_VIDEOONLY | DSCAPS_DOUBLE;
 
-        SDL_DFB_CHECKERR(devdata->
-                         dfb->GetDisplayLayer(devdata->dfb, dispdata->vidID,
-                                              &dispdata->vidlayer));
-        SDL_DFB_CHECKERR(dispdata->
-                         vidlayer->SetCooperativeLevel(dispdata->vidlayer,
-                                                       DLSCL_EXCLUSIVE));
+        SDL_DFB_CHECKERR(devdata->dfb->
+                         GetDisplayLayer(devdata->dfb, dispdata->vidID,
+                                         &dispdata->vidlayer));
+        SDL_DFB_CHECKERR(dispdata->vidlayer->
+                         SetCooperativeLevel(dispdata->vidlayer,
+                                             DLSCL_EXCLUSIVE));
 
         if (devdata->use_yuv_underlays) {
             ret = dispdata->vidlayer->SetLevel(dispdata->vidlayer, -1);
             if (ret != DFB_OK)
                 SDL_DFB_DEBUG("Underlay Setlevel not supported\n");
         }
-        SDL_DFB_CHECKERR(dispdata->
-                         vidlayer->SetConfiguration(dispdata->vidlayer,
-                                                    &layconf));
-        SDL_DFB_CHECKERR(dispdata->
-                         vidlayer->GetSurface(dispdata->vidlayer,
-                                              &data->surface));
+        SDL_DFB_CHECKERR(dispdata->vidlayer->
+                         SetConfiguration(dispdata->vidlayer, &layconf));
+        SDL_DFB_CHECKERR(dispdata->vidlayer->
+                         GetSurface(dispdata->vidlayer, &data->surface));
         dispdata->vidIDinuse = 1;
         data->display = display;
         return 0;
@@ -488,9 +486,9 @@
   error:
     if (dispdata->vidlayer) {
         SDL_DFB_RELEASE(data->surface);
-        SDL_DFB_CHECKERR(dispdata->
-                         vidlayer->SetCooperativeLevel(dispdata->vidlayer,
-                                                       DLSCL_ADMINISTRATIVE));
+        SDL_DFB_CHECKERR(dispdata->vidlayer->
+                         SetCooperativeLevel(dispdata->vidlayer,
+                                             DLSCL_ADMINISTRATIVE));
         SDL_DFB_RELEASE(dispdata->vidlayer);
     }
     return 1;
@@ -542,14 +540,12 @@
         data->pixels = NULL;
 
         /* Create the surface */
-        SDL_DFB_CHECKERR(devdata->
-                         dfb->CreateSurface(devdata->dfb, &dsc,
-                                            &data->surface));
+        SDL_DFB_CHECKERR(devdata->dfb->
+                         CreateSurface(devdata->dfb, &dsc, &data->surface));
         if (SDL_ISPIXELFORMAT_INDEXED(data->format)
             && !SDL_ISPIXELFORMAT_FOURCC(data->format)) {
-            SDL_DFB_CHECKERR(data->
-                             surface->GetPalette(data->surface,
-                                                 &data->palette));
+            SDL_DFB_CHECKERR(data->surface->
+                             GetPalette(data->surface, &data->palette));
         }
 
     }
@@ -606,9 +602,9 @@
             entries[i].b = colors[i].b;
             entries[i].a = 0xFF;
         }
-        SDL_DFB_CHECKERR(data->
-                         palette->SetEntries(data->palette, entries, ncolors,
-                                             firstcolor));
+        SDL_DFB_CHECKERR(data->palette->
+                         SetEntries(data->palette, entries, ncolors,
+                                    firstcolor));
         return 0;
     } else {
         SDL_SetError("YUV textures don't have a palette");
@@ -630,9 +626,9 @@
         DFBColor entries[256];
         int i;
 
-        SDL_DFB_CHECKERR(data->
-                         palette->GetEntries(data->palette, entries, ncolors,
-                                             firstcolor));
+        SDL_DFB_CHECKERR(data->palette->
+                         GetEntries(data->palette, entries, ncolors,
+                                    firstcolor));
 
         for (i = 0; i < ncolors; ++i) {
             colors[i].r = entries[i].r;
@@ -811,9 +807,8 @@
     a = renderer->a;
 
     SetBlendMode(data, renderer->blendMode, NULL);
-    SDL_DFB_CHECKERR(data->
-                     surface->SetDrawingFlags(data->surface,
-                                              data->drawFlags));
+    SDL_DFB_CHECKERR(data->surface->
+                     SetDrawingFlags(data->surface, data->drawFlags));
 
     switch (renderer->blendMode) {
     case SDL_BLENDMODE_NONE:
@@ -873,9 +868,9 @@
     DFBResult ret;
 
     PrepareDraw(renderer);
-    SDL_DFB_CHECKERR(data->
-                     surface->FillRectangle(data->surface, rect->x, rect->y,
-                                            rect->w, rect->h));
+    SDL_DFB_CHECKERR(data->surface->
+                     FillRectangle(data->surface, rect->x, rect->y, rect->w,
+                                   rect->h));
 
     return 0;
   error:
@@ -899,18 +894,15 @@
         SDL_VideoDisplay *display = texturedata->display;
         DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
 
-        SDL_DFB_CHECKERR(dispdata->
-                         vidlayer->SetSourceRectangle(dispdata->vidlayer,
-                                                      srcrect->x, srcrect->y,
-                                                      srcrect->w,
-                                                      srcrect->h));
+        SDL_DFB_CHECKERR(dispdata->vidlayer->
+                         SetSourceRectangle(dispdata->vidlayer, srcrect->x,
+                                            srcrect->y, srcrect->w,
+                                            srcrect->h));
         windata->window->GetPosition(windata->window, &px, &py);
-        SDL_DFB_CHECKERR(dispdata->
-                         vidlayer->SetScreenRectangle(dispdata->vidlayer,
-                                                      px + dstrect->x,
-                                                      py + dstrect->y,
-                                                      dstrect->w,
-                                                      dstrect->h));
+        SDL_DFB_CHECKERR(dispdata->vidlayer->
+                         SetScreenRectangle(dispdata->vidlayer,
+                                            px + dstrect->x, py + dstrect->y,
+                                            dstrect->w, dstrect->h));
     } else {
         DFBRectangle sr, dr;
         DFBSurfaceBlittingFlags flags = 0;
@@ -938,8 +930,9 @@
 
         SDL_DFB_CHECKERR(data->surface->SetColor(data->surface, 0xFF,
                                                  0xFF, 0xFF, 0xFF));
-        if (texture->modMode &
-            (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA)) {
+        if (texture->
+            modMode & (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA))
+        {
             if (texture->modMode & SDL_TEXTUREMODULATE_ALPHA) {
                 alpha = texture->a;
                 SDL_DFB_CHECKERR(data->surface->SetColor(data->surface, 0xFF,
@@ -947,10 +940,9 @@
             }
             if (texture->modMode & SDL_TEXTUREMODULATE_COLOR) {
 
-                SDL_DFB_CHECKERR(data->
-                                 surface->SetColor(data->surface, texture->r,
-                                                   texture->g, texture->b,
-                                                   alpha));
+                SDL_DFB_CHECKERR(data->surface->
+                                 SetColor(data->surface, texture->r,
+                                          texture->g, texture->b, alpha));
                 flags |= DSBLIT_COLORIZE;
             }
             if (alpha < 0xFF)
@@ -961,25 +953,24 @@
 
         SetBlendMode(data, texture->blendMode, texturedata);
 
-        SDL_DFB_CHECKERR(data->surface->SetBlittingFlags(data->surface,
-                                                         data->
-                                                         blitFlags | flags));
+        SDL_DFB_CHECKERR(data->surface->
+                         SetBlittingFlags(data->surface,
+                                          data->blitFlags | flags));
 
 #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
         SDL_DFB_CHECKERR(data->surface->SetRenderOptions(data->surface,
-                                                         texturedata->render_options));
+                                                         texturedata->
+                                                         render_options));
 #endif
 
         if (srcrect->w == dstrect->w && srcrect->h == dstrect->h) {
-            SDL_DFB_CHECKERR(data->
-                             surface->Blit(data->surface,
-                                           texturedata->surface, &sr, dr.x,
-                                           dr.y));
+            SDL_DFB_CHECKERR(data->surface->
+                             Blit(data->surface, texturedata->surface,
+                                  &sr, dr.x, dr.y));
         } else {
-            SDL_DFB_CHECKERR(data->
-                             surface->StretchBlit(data->surface,
-                                                  texturedata->surface, &sr,
-                                                  &dr));
+            SDL_DFB_CHECKERR(data->surface->
+                             StretchBlit(data->surface, texturedata->surface,
+                                         &sr, &dr));
         }
     }
     return 0;
@@ -1002,8 +993,8 @@
     sr.h = window->h;
 
     /* Send the data to the display */
-    SDL_DFB_CHECKERR(data->
-                     surface->Flip(data->surface, NULL, data->flipflags));
+    SDL_DFB_CHECKERR(data->surface->
+                     Flip(data->surface, NULL, data->flipflags));
 
     return;
   error: