mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-10 10:10:02 -04:00
fixed sampleBuffer::tryToMakeRelative() for win32 - paths to samples are now saved relative in win32-version too (if possible)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1469 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
2008-08-22 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/core/main.cpp:
|
||||
fixed splash-screen for win32
|
||||
|
||||
* src/core/sample_buffer.cpp:
|
||||
fixed sampleBuffer::tryToMakeRelative() for win32 - paths to samples
|
||||
are now saved relative in win32-version too (if possible)
|
||||
|
||||
* src/core/piano.cpp:
|
||||
fixed keycodes for win32 version
|
||||
|
||||
|
||||
@@ -1137,15 +1137,18 @@ QString sampleBuffer::tryToMakeRelative( const QString & _file )
|
||||
{
|
||||
if( QFileInfo( _file ).isRelative() == FALSE )
|
||||
{
|
||||
QString f = QString( _file ).replace( QDir::separator(), '/' );
|
||||
QString fsd = configManager::inst()->factorySamplesDir();
|
||||
QString usd = configManager::inst()->userSamplesDir();
|
||||
if( _file.startsWith( fsd ) )
|
||||
fsd.replace( QDir::separator(), '/' );
|
||||
usd.replace( QDir::separator(), '/' );
|
||||
if( f.startsWith( fsd ) )
|
||||
{
|
||||
return( QString( _file ).mid( fsd.length() ) );
|
||||
return( QString( f ).mid( fsd.length() ) );
|
||||
}
|
||||
else if( _file.startsWith( usd ) )
|
||||
else if( f.startsWith( usd ) )
|
||||
{
|
||||
return( QString( _file ).mid( usd.length() ) );
|
||||
return( QString( f ).mid( usd.length() ) );
|
||||
}
|
||||
}
|
||||
return( _file );
|
||||
|
||||
Reference in New Issue
Block a user