Commit c11962b0 authored by Couriersud's avatar Couriersud

Fixed MakeSubSurface compiling issue for DirectFB <= 1.2.0

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403500
parent eeeee885
This diff is collapsed.
......@@ -71,9 +71,9 @@
#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */
#define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */
#define SDL_DFB_RELEASE(x) do { if ( x ) { x->Release(x); x = NULL; } } while (0)
#define SDL_DFB_FREE(x) do { if ( x ) { SDL_free(x); x = NULL; } } while (0)
#define SDL_DFB_UNLOCK(x) do { if ( x ) { x->Unlock(x); } } while (0)
#define SDL_DFB_RELEASE(x) do { if ( (x) != NULL ) { x->Release(x); x = NULL; } } while (0)
#define SDL_DFB_FREE(x) do { if ( (x) != NULL ) { SDL_free(x); x = NULL; } } while (0)
#define SDL_DFB_UNLOCK(x) do { if ( (x) != NULL ) { x->Unlock(x); } } while (0)
#if DEBUG
#define SDL_DFB_DEBUG(x...) do { fprintf(LOG_CHANNEL, "%s:", __FUNCTION__); fprintf(LOG_CHANNEL, x); } while (0)
......
......@@ -420,7 +420,7 @@ DirectFB_AdjustWindowSurface(SDL_Window * window)
}
if (adjust) {
#if DFB_VERSION_ATLEAST(1,2,0)
#if DFB_VERSION_ATLEAST(1,2,1)
SDL_DFB_CHECKERR(windata->window->ResizeSurface(windata->window,
windata->size.w,
windata->size.h));
......@@ -430,16 +430,13 @@ DirectFB_AdjustWindowSurface(SDL_Window * window)
&windata->client));
#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));
GetSubSurface(windata->window_surface, &windata->client,
&windata->surface));
#endif
DirectFB_WM_RedrawLayout(window);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment