diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-04-09 22:50:05 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-04-09 22:51:19 (GMT) |
commit | b52e3da01bd43da12587654f6d4e3f3ececed0cf (patch) | |
tree | e18d2c2eab3b121ae84acdad4bd05fd90349dc0d /src/plugins/gfxdrivers | |
parent | d4f23b414c337654d65ba54937e40d46b8510c0a (diff) | |
download | Qt-b52e3da01bd43da12587654f6d4e3f3ececed0cf.zip Qt-b52e3da01bd43da12587654f6d4e3f3ececed0cf.tar.gz Qt-b52e3da01bd43da12587654f6d4e3f3ececed0cf.tar.bz2 |
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
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 8 |
1 files 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) |