diff --git a/stepmania/src/NotesLoaderSM.cpp b/stepmania/src/NotesLoaderSM.cpp index e01f50c7e8..e121fa8f8b 100644 --- a/stepmania/src/NotesLoaderSM.cpp +++ b/stepmania/src/NotesLoaderSM.cpp @@ -372,7 +372,7 @@ bool SMLoader::LoadFromDir( CString sPath, Song &out ) return LoadFromSMFile( sPath + aFileNames[0], out ); } -bool SMLoader::LoadEdit( CString sEditFilePath ) +bool SMLoader::LoadEdit( CString sEditFilePath, ProfileSlot slot ) { LOG->Trace( "Song::LoadEdit(%s)", sEditFilePath.c_str() ); @@ -430,7 +430,9 @@ bool SMLoader::LoadEdit( CString sEditFilePath ) LoadFromSMTokens( sParams[1], sParams[2], sParams[3], sParams[4], sParams[5], sParams[6], (iNumParams>=8)?sParams[7]:"", *pNewNotes); - /* XXX: set m_LoadedFromProfile, force m_Difficulty == DIFFICULTY_EDIT */ + + pNewNotes->SetLoadedFromProfile( slot ); + pNewNotes->SetDifficulty( DIFFICULTY_EDIT ); } else LOG->Trace( "Unexpected value named '%s'", sValueName.c_str() ); diff --git a/stepmania/src/NotesLoaderSM.h b/stepmania/src/NotesLoaderSM.h index 6a544090c2..11a014b241 100644 --- a/stepmania/src/NotesLoaderSM.h +++ b/stepmania/src/NotesLoaderSM.h @@ -33,7 +33,7 @@ public: bool LoadFromDir( CString sPath, Song &out ); static bool LoadTimingFromFile( const CString &fn, TimingData &out ); static void LoadTimingFromSMFile( const MsdFile &msd, TimingData &out ); - static bool LoadEdit( CString sEditFilePath ); + static bool LoadEdit( CString sEditFilePath, ProfileSlot slot ); }; #endif diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 3b148aa472..97e28598e8 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -967,7 +967,7 @@ void SongManager::LoadAllFromProfiles() { CString sEditFileWithPath = asEditsFilesWithPath[i]; - SMLoader::LoadEdit( sEditFileWithPath ); + SMLoader::LoadEdit( sEditFileWithPath, (ProfileSlot) s ); } }