Commit ff9295b5 authored by Erwan Tulou's avatar Erwan Tulou

skins2: For Linux, correct files that cannot be loaded because of a workaround...

skins2: For Linux, correct files that cannot be loaded because of a workaround that only makes sense on Windows.

Forcefully setting a file name with lower case was inserted to solve an issue that is only true on Windows. On Linux, upper/lower case must not be tampered with.
This resulted in skins like Orangeade.vlt failing to load their fonts on Linux.
(cherry picked from commit 4f1060a7)
parent a2700366
......@@ -66,12 +66,15 @@ void IniFile::parseFile()
string var = line.substr( 0, eqPos );
string val = line.substr( eqPos + 1, line.size() - eqPos - 1);
// Convert to lower case because of some buggy winamp2 skins
string name = m_name + "." + section + "." + var;
#ifdef WIN32
// Convert to lower case because of some buggy winamp2 skins
for( size_t i=0; i< name.size(); i++)
{
name[i] = tolower( name[i] );
}
#endif
// Register the value in the var manager
pVarManager->registerConst( name, val );
......
......@@ -204,6 +204,8 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir )
return false;
}
#ifdef WIN32
// Convert the file name to lower case, because some winamp skins
// use the wrong case...
for( size_t i=0; i< strlen( filenameInZip ); i++)
......@@ -211,6 +213,8 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir )
filenameInZip[i] = tolower( filenameInZip[i] );
}
#endif
// Allocate the buffer
void *pBuffer = malloc( ZIP_BUFFER_SIZE );
if( !pBuffer )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment