From 65ac3e43e89d99ecc59ede124b3e97f31ac35308 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 10 Sep 2002 16:31:35 +0000 Subject: [PATCH] Fixed GetMusicPath in case where DWIPath is "" --- stepmania/src/Background.cpp | 8 ++++---- stepmania/src/Song.cpp | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 2c766941ef..3c4c090abf 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -109,7 +109,6 @@ void Background::LoadFromSong( Song* pSong ) const float fXZoom = RECTWIDTH(RECT_BACKGROUND) / (float)SCREEN_WIDTH; const float fYZoom = RECTHEIGHT(RECT_BACKGROUND) / (float)SCREEN_HEIGHT; - const float fZoom = max(fXZoom,fYZoom); // @@ -354,12 +353,13 @@ void Background::LoadFromSong( Song* pSong ) for( int i=0; iSetXY( (float)LEFT_EDGE, (float)TOP_EDGE ); - m_BackgroundAnimations[i]->SetZoom( fZoom ); + m_BackgroundAnimations[i]->SetZoomX( fXZoom ); + m_BackgroundAnimations[i]->SetZoomY( fYZoom ); } m_BGADanger.SetXY( (float)LEFT_EDGE, (float)TOP_EDGE ); - m_BGADanger.SetZoom( fZoom ); - + m_BGADanger.SetZoomX( fXZoom ); + m_BGADanger.SetZoomY( fYZoom ); } diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 87ebf2913e..d659ed1574 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -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;