From b52e3da01bd43da12587654f6d4e3f3ececed0cf Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 9 Apr 2009 15:50:05 -0700 Subject: Better warnings when primary is not in videomem If connect options are set to include videoonly and creating the primary surface in video memory fails warn even in release mode. Reviewed-by: TrustMe --- src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 04d2f57..8e57bb2 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -233,8 +233,11 @@ 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) { + if (result != DFB_OK +#ifdef QT_NO_DEBUG + && (desc->flags & DSDESC_CAPS) && (desc->caps & DSCAPS_PRIMARY) +#endif + ) { 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, @@ -242,7 +245,6 @@ IDirectFBSurface* QDirectFBScreen::createDFBSurface(const DFBSurfaceDescription desc->preallocated[0].data, desc->preallocated[0].pitch, DirectFBErrorString(result)); } -#endif } if (!newSurface) -- cgit v0.12