Fixed GetMusicPath in case where DWIPath is ""

This commit is contained in:
Chris Danford
2002-09-10 16:31:35 +00:00
parent 3022600bf3
commit 65ac3e43e8
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -993,7 +993,10 @@ int Song::GetNumTimesPlayed() const
CString Song::GetMusicPath() const
{
if(m_sSongDir != "" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath)
// Glenn, did you mean this? m_DWIPath is empty in my ini, so
// the old if statement thinks every song is being loaded from DWIPath.
if( PREFSMAN->m_DWIPath!="" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath )
// if(m_sSongDir != "" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath)
return PREFSMAN->m_DWIPath+"\\"+m_sMusicFile;
return m_sMusicFile.Left(2) == ".\\"? m_sMusicFile : m_sSongDir+m_sMusicFile;