Intel drivers add a whitespace at the end of the renderer string which makes it impossible to get a good blacklist with equal comparison.
So let's switch to a contains check, which makes it easier to have a blacklist, e.g. just GeForce. CCBUG: 243181 CCBUG: 242985 svn path=/trunk/KDE/kdebase/workspace/; revision=1150353
This commit is contained in:
parent
9674ca3822
commit
6894bf6e86
1 changed files with 9 additions and 4 deletions
|
@ -393,8 +393,7 @@ bool EffectsHandler::checkDriverBlacklist( const KConfigGroup& blacklist )
|
||||||
{
|
{
|
||||||
QString vendor = QString((const char*)glGetString( GL_VENDOR ));
|
QString vendor = QString((const char*)glGetString( GL_VENDOR ));
|
||||||
QString renderer = QString((const char*)glGetString( GL_RENDERER ));
|
QString renderer = QString((const char*)glGetString( GL_RENDERER ));
|
||||||
renderer.append( ":-:" );
|
QString version = QString((const char*)glGetString( GL_VERSION ));
|
||||||
renderer.append((const char*)glGetString( GL_VERSION ));
|
|
||||||
foreach( const QString& key, blacklist.keyList() )
|
foreach( const QString& key, blacklist.keyList() )
|
||||||
{
|
{
|
||||||
// the key is a word in the renderer string or vendor referrencing the vendor in case of mesa
|
// the key is a word in the renderer string or vendor referrencing the vendor in case of mesa
|
||||||
|
@ -403,9 +402,15 @@ bool EffectsHandler::checkDriverBlacklist( const KConfigGroup& blacklist )
|
||||||
{
|
{
|
||||||
// the value for current key contains a string list of driver versions which have to be blacklisted
|
// the value for current key contains a string list of driver versions which have to be blacklisted
|
||||||
QStringList versions = blacklist.readEntry< QStringList >( key, QStringList() );
|
QStringList versions = blacklist.readEntry< QStringList >( key, QStringList() );
|
||||||
foreach( const QString& version, versions )
|
foreach( const QString& entry, versions )
|
||||||
{
|
{
|
||||||
if( version == renderer )
|
QStringList parts = entry.split( ":-:" );
|
||||||
|
if( parts.size() != 2 )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if( renderer.contains(parts[0], Qt::CaseInsensitive) &&
|
||||||
|
version.contains(parts[1], Qt::CaseInsensitive) )
|
||||||
{
|
{
|
||||||
// the version matches the renderer string - this driver is blacklisted, return
|
// the version matches the renderer string - this driver is blacklisted, return
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue