From dabd8caa4a2faffefbc7f9bb4f233283458c779e Mon Sep 17 00:00:00 2001 From: Iain Date: Mon, 11 May 2009 19:36:46 +0200 Subject: A better way of getting the screen's colour depth --- src/gui/kernel/qapplication_s60.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index ea0c3a6..72c2855 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -693,27 +693,8 @@ void qt_init(QApplicationPrivate *priv, int) S60->updateScreenSize(); - TDisplayMode mode = S60->screenDevice()->DisplayMode(); ; - switch(mode) { - case EColor256: - S60->screenDepth = 8; - break; - case EColor4K: - S60->screenDepth = 12; - break; - case EColor64K: - S60->screenDepth = 16; - break; - case EColor16M: - case EColor16MU: - case EColor16MA: - S60->screenDepth = 32; - break; - default: - qFatal("Unsupported screen depth"); - break; - } - + TDisplayMode mode = S60->screenDevice()->DisplayMode(); + S60->screenDepth = TDisplayModeUtils::NumDisplayModeBitsPerPixel(mode); RProcess me; TSecureId securId = me.SecureId(); -- cgit v0.12