src/video/directfb/SDL_DirectFB_window.c
changeset 3040 62d4992e5a92
parent 3039 829043b363d1
child 3685 64ce267332c6
     1.1 --- a/src/video/directfb/SDL_DirectFB_window.c	Tue Jan 13 23:27:08 2009 +0000
     1.2 +++ b/src/video/directfb/SDL_DirectFB_window.c	Wed Jan 14 04:25:32 2009 +0000
     1.3 @@ -101,7 +101,8 @@
     1.4      windata->window->SetOptions(windata->window, wopts);
     1.5  
     1.6      /* See what we got */
     1.7 -    SDL_DFB_CHECKERR(DirectFB_WM_GetClientSize(_this, window, &window->w, &window->h));
     1.8 +    SDL_DFB_CHECKERR(DirectFB_WM_GetClientSize
     1.9 +                     (_this, window, &window->w, &window->h));
    1.10  
    1.11      /* Get the window's surface. */
    1.12      SDL_DFB_CHECKERR(windata->window->GetSurface(windata->window,
    1.13 @@ -115,9 +116,10 @@
    1.14  
    1.15      /* Create Eventbuffer */
    1.16      SDL_DFB_CHECKERR(windata->window->CreateEventBuffer(windata->window,
    1.17 -                                                        &windata->eventbuffer));
    1.18 -    SDL_DFB_CHECKERR(windata->
    1.19 -                     window->EnableEvents(windata->window, DWET_ALL));
    1.20 +                                                        &windata->
    1.21 +                                                        eventbuffer));
    1.22 +    SDL_DFB_CHECKERR(windata->window->
    1.23 +                     EnableEvents(windata->window, DWET_ALL));
    1.24  
    1.25      /* Create a font */
    1.26      /* FIXME: once during Video_Init */
    1.27 @@ -279,7 +281,8 @@
    1.28          SDL_DFB_CHECKERR(windata->window->EnableEvents(windata->window,
    1.29                                                         DWET_ALL));
    1.30  
    1.31 -        SDL_DFB_CHECKERR(DirectFB_WM_GetClientSize(_this, window, &window->w, &window->h));
    1.32 +        SDL_DFB_CHECKERR(DirectFB_WM_GetClientSize
    1.33 +                         (_this, window, &window->w, &window->h));
    1.34  
    1.35          SDL_OnWindowResized(window);
    1.36      }
    1.37 @@ -322,7 +325,7 @@
    1.38      SDL_DFB_WINDOWDATA(window);
    1.39  
    1.40      if (windata->is_managed) {
    1.41 -    	DirectFB_WM_MaximizeWindow(_this, window);
    1.42 +        DirectFB_WM_MaximizeWindow(_this, window);
    1.43      } else
    1.44          SDL_Unsupported();
    1.45  }
    1.46 @@ -341,7 +344,7 @@
    1.47      SDL_DFB_WINDOWDATA(window);
    1.48  
    1.49      if (windata->is_managed) {
    1.50 -    	DirectFB_WM_RestoreWindow(_this, window);
    1.51 +        DirectFB_WM_RestoreWindow(_this, window);
    1.52      } else
    1.53          SDL_Unsupported();
    1.54  }
    1.55 @@ -421,31 +424,30 @@
    1.56  
    1.57      if (adjust) {
    1.58  #if DFB_VERSION_ATLEAST(1,2,1)
    1.59 -       SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
    1.60 +        SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
    1.61                                                          windata->size.w,
    1.62                                                          windata->size.h));
    1.63 -       SDL_DFB_CHECKERR(windata->surface->MakeSubSurface(windata->surface,
    1.64 +        SDL_DFB_CHECKERR(windata->surface->MakeSubSurface(windata->surface,
    1.65                                                            windata->
    1.66                                                            window_surface,
    1.67                                                            &windata->client));
    1.68  #else
    1.69 - 	   DFBWindowOptions opts;
    1.70 +        DFBWindowOptions opts;
    1.71 +
    1.72 +        SDL_DFB_CHECKERR(windata->window->GetOptions(windata->window, &opts));
    1.73 +        /* recreate subsurface */
    1.74 +        SDL_DFB_RELEASE(windata->surface);
    1.75  
    1.76 -	   SDL_DFB_CHECKERR(windata->window->GetOptions(windata->window, &opts));
    1.77 -       /* recreate subsurface */
    1.78 -       SDL_DFB_RELEASE(windata->surface);
    1.79 -       
    1.80 -       if (opts & DWOP_SCALE)
    1.81 -          SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
    1.82 -                                                          windata->size.w,
    1.83 -                                                          windata->size.h));
    1.84 -       SDL_DFB_CHECKERR(windata->window_surface->
    1.85 -                      GetSubSurface(windata->window_surface, &windata->client,
    1.86 -                                  &windata->surface));
    1.87 +        if (opts & DWOP_SCALE)
    1.88 +            SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
    1.89 +                                                            windata->size.w,
    1.90 +                                                            windata->size.h));
    1.91 +        SDL_DFB_CHECKERR(windata->window_surface->
    1.92 +                         GetSubSurface(windata->window_surface,
    1.93 +                                       &windata->client, &windata->surface));
    1.94  #endif
    1.95 -       DirectFB_WM_RedrawLayout(window);
    1.96 +        DirectFB_WM_RedrawLayout(window);
    1.97      }
    1.98    error:
    1.99      return;
   1.100  }
   1.101 -