Mercurial > sdl-ios-xcode
diff src/video/directfb/SDL_DirectFB_window.c @ 3037:490f3e4fe753
Added DFB_VERSION_ATLEAST macro
First attempt at replacing MakeSubSurface for pre 1.2.0 ==> Scaling not yet working
author | Couriersud <couriersud@arcor.de> |
---|---|
date | Tue, 13 Jan 2009 21:17:38 +0000 |
parents | d72a0dd80e8b |
children | c73a5f8a03d2 |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_window.c Tue Jan 13 19:31:06 2009 +0000 +++ b/src/video/directfb/SDL_DirectFB_window.c Tue Jan 13 21:17:38 2009 +0000 @@ -420,14 +420,28 @@ } if (adjust) { - SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window, +#if DFB_VERSION_ATLEAST(1,2,0) + SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window, windata->size.w, windata->size.h)); - SDL_DFB_CHECKERR(windata->surface->MakeSubSurface(windata->surface, + SDL_DFB_CHECKERR(windata->surface->MakeSubSurface(windata->surface, windata-> window_surface, &windata->client)); - DirectFB_WM_RedrawLayout(window); +#else + /* recreate subsurface */ + windata->surface->ReleaseSource(windata->surface); + windata->window_surface->ReleaseSource(windata->window_surface); + SDL_DFB_RELEASE(windata->surface); + windata->surface = NULL; + SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window, + windata->size.w, + windata->size.h)); + SDL_DFB_CHECKERR(windata->window_surface-> + GetSubSurface(windata->window_surface, &windata->client, + &windata->surface)); +#endif + DirectFB_WM_RedrawLayout(window); } error: return;