From 7991f3e99d7b5d9c4151a8759a531b8f1c37a522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 27 Apr 2009 10:12:12 +0000 Subject: [PATCH] Ati changed the OpenGL version string. It used to be in the first part, now it is in the second part encapsulated in parenthesis. So new driver versions are now recognized again. Looking forward to the next change. svn path=/trunk/KDE/kdebase/workspace/; revision=959824 --- compositingprefs.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/compositingprefs.cpp b/compositingprefs.cpp index 5c4c377d3e..ec811fb3ff 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -255,7 +255,16 @@ void CompositingPrefs::detectDriverAndVersion() else if( mGLVendor == "ATI Technologies Inc." ) { mDriver = "fglrx"; - mVersion = Version( mGLVersion.split(" ").first()); + // Ati changed the version string. + // The GL version is either in the first or second part + QStringList versionParts = mGLVersion.split(" "); + if( versionParts.first().count(".") == 2 || versionParts.count() == 1 ) + mVersion = Version( versionParts.first() ); + else + { + // version in second part is encapsulated in () + mVersion = Version( versionParts[1].mid( 1, versionParts[1].length() -2 ) ); + } } else if( mGLRenderer.startsWith( "Mesa DRI" )) {