[vlc-devel] Re : commit: skins2: For Linux, correct files that cannot be loaded because of a workaround that only makes sense on Windows . (Erwan Tulou )
brezhoneg1 at yahoo.fr
Fri Jul 10 16:40:16 CEST 2009
> 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.
If the following comment is correct, then I think that your fix is not valid.
> - // 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] );
Let's take an example : the new orangeade_1.0.vlt that uses a "Sansation_Regular.ttf" file name for fonts, and refers to it as "Sansation_Regular.ttf" in theme.xml.
Without the patch :
- on Windows; it works fine
- on Linux, it fails to open the font file.
The problem comes from the (weird ?) workaround that forces filenames to lower case, yet keeps on using the filename stated in the theme.xml file. Windows seems to not care that much about lower/upper case in filenames and still opens it. Linux of course won't open it, if it doesn't exactly match the name.
The easy way I found was to limit this workaround to Windows with a #ifdef WIN32. But, there may be a better way to handle this ?
More information about the vlc-devel