Fix fullscreen crash with DirectFB <= 1.2.0
authorCouriersud <couriersud@arcor.de>
Tue, 13 Jan 2009 23:27:08 +0000
changeset 3039829043b363d1
parent 3038 c73a5f8a03d2
child 3040 62d4992e5a92
Fix fullscreen crash with DirectFB <= 1.2.0
src/video/directfb/SDL_DirectFB_window.c
     1.1 --- a/src/video/directfb/SDL_DirectFB_window.c	Tue Jan 13 22:59:02 2009 +0000
     1.2 +++ b/src/video/directfb/SDL_DirectFB_window.c	Tue Jan 13 23:27:08 2009 +0000
     1.3 @@ -429,11 +429,16 @@
     1.4                                                            window_surface,
     1.5                                                            &windata->client));
     1.6  #else
     1.7 + 	   DFBWindowOptions opts;
     1.8 +
     1.9 +	   SDL_DFB_CHECKERR(windata->window->GetOptions(windata->window, &opts));
    1.10         /* recreate subsurface */
    1.11         SDL_DFB_RELEASE(windata->surface);
    1.12 -       SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
    1.13 -                                                       windata->size.w,
    1.14 -                                                       windata->size.h));
    1.15 +       
    1.16 +       if (opts & DWOP_SCALE)
    1.17 +          SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
    1.18 +                                                          windata->size.w,
    1.19 +                                                          windata->size.h));
    1.20         SDL_DFB_CHECKERR(windata->window_surface->
    1.21                        GetSubSurface(windata->window_surface, &windata->client,
    1.22                                    &windata->surface));