From 9bde7d2fb617f5f0442904aaa536906ca962cdcb Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Fri, 22 Aug 2008 22:43:48 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ src/core/sample_buffer.cpp | 11 +++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d894d3ae..0267d3140 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-08-22 Tobias Doerffel + * 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 diff --git a/src/core/sample_buffer.cpp b/src/core/sample_buffer.cpp index 0271fcd75..618ccdbab 100644 --- a/src/core/sample_buffer.cpp +++ b/src/core/sample_buffer.cpp @@ -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 );