From c2ef38b83c73c1a699af16a5aab4f542f1f44774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 24 Sep 2008 16:36:24 +0000 Subject: [PATCH] Match intel and nvidia more exactly when detecting, and also enable by default ati cards with fglrx driver or (only r200 ...?) with radeon driver. svn path=/trunk/KDE/kdebase/workspace/; revision=864377 --- compositingprefs.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/compositingprefs.cpp b/compositingprefs.cpp index 35fa8ac62b..84bdaeca89 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -218,18 +218,28 @@ void CompositingPrefs::detectDriverAndVersion() kDebug( 1212 ) << "GL version is" << mGLVersion; kDebug( 1212 ) << "XGL:" << ( mXgl ? "yes" : "no" ); - if( mGLRenderer.contains( "Intel" )) + if( mGLRenderer.startsWith( "Mesa DRI Intel" )) { mDriver = "intel"; QStringList words = mGLRenderer.split(" "); mVersion = Version( words[ words.count() - 2 ] ); } - else if( mGLVendor.contains( "NVIDIA" )) + else if( mGLVendor == "NVIDIA Corporation" ) { mDriver = "nvidia"; QStringList words = mGLVersion.split(" "); mVersion = Version( words[ words.count() - 1 ] ); } + else if( mGLVendor == "ATI Technologies Inc." ) + { + mDriver = "fglrx"; + mVersion = Version( mGLVersion.split(" ").first()); + } + else if( mGLRenderer.startsWith( "Mesa DRI R200" )) + { // radeon r200 only ? + mDriver = "radeon"; + mVersion = Version( mGLRenderer.split(" ")[ 3 ] ); + } else { mDriver = "unknown";