diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-05-28 17:51:32 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-05-28 17:51:32 (GMT) |
commit | 36ae58e7a6a888d3ae7bd162d59daada550bbfb1 (patch) | |
tree | 98e63fa09911e35649fca2ec6f1f2f01773abb8d | |
parent | 4a82680736ace8abb46e6fb5e085e8622f154b2d (diff) | |
download | Qt-36ae58e7a6a888d3ae7bd162d59daada550bbfb1.zip Qt-36ae58e7a6a888d3ae7bd162d59daada550bbfb1.tar.gz Qt-36ae58e7a6a888d3ae7bd162d59daada550bbfb1.tar.bz2 |
Warn when trying to use an unsupported format
Due to incompatibilities between RGB32 in DirectFB and Qt we can't use
RGB32.
Reviewed-by: Donald <qt-info@nokia.com>
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 98e32ed..9e35a66 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -958,9 +958,6 @@ bool QDirectFBScreen::connect(const QString &displaySpec) return false; } - if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive)) - printDirectFBInfo(d_ptr->dfb, d_ptr->dfbSurface); - // Work out what format we're going to use for surfaces with an alpha channel d_ptr->alphaPixmapFormat = QDirectFBScreen::getImageFormat(d_ptr->dfbSurface); setPixelFormat(d_ptr->alphaPixmapFormat); @@ -971,12 +968,17 @@ bool QDirectFBScreen::connect(const QString &displaySpec) case QImage::Format_RGB444: d_ptr->alphaPixmapFormat = QImage::Format_ARGB4444_Premultiplied; break; + case QImage::Format_RGB32: + qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the RGB32 pixelformat. " + "We recommmend using ARGB instead"); + return false; + case QImage::Format_Indexed8: + qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the LUT8 pixelformat."); + return false; case QImage::NImageFormats: case QImage::Format_Invalid: case QImage::Format_Mono: case QImage::Format_MonoLSB: - case QImage::Format_Indexed8: - case QImage::Format_RGB32: case QImage::Format_RGB888: case QImage::Format_RGB16: case QImage::Format_RGB555: @@ -1037,6 +1039,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec) setGraphicsSystem(d_ptr); + if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive)) + printDirectFBInfo(d_ptr->dfb, d_ptr->dfbSurface); + return true; } |