From 2cf88ffef18622b5c08cd48d4cb0b5624c59a713 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Wed, 8 Apr 2009 16:07:04 -0700 Subject: Diagnostic info when failing to create surface Only enabled in debug builds since it could something that should be ignored. Reviewed-by: Donald --- src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index bf9864a..04d2f57 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -233,6 +233,16 @@ IDirectFBSurface* QDirectFBScreen::createDFBSurface(const DFBSurfaceDescription voDesc.caps = DFBSurfaceCapabilities(voDesc.caps | DSCAPS_VIDEOONLY); } result = d_ptr->dfb->CreateSurface(d_ptr->dfb, &voDesc, &newSurface); +#ifndef QT_NO_DEBUG + if (result != DFB_OK) { + qWarning("QDirectFBScreen::createDFBSurface() Failed to create surface in video memory!\n" + " Flags %0x Caps %0x width %d height %d pixelformat %0x %d preallocated %p %d\n%s", + desc->flags, desc->caps, desc->width, desc->height, + desc->pixelformat, DFB_PIXELFORMAT_INDEX(desc->pixelformat), + desc->preallocated[0].data, desc->preallocated[0].pitch, + DirectFBErrorString(result)); + } +#endif } if (!newSurface) -- cgit v0.12