Fix newline accumulation in SM data.
This commit is contained in:
@@ -134,7 +134,7 @@ CString NoteDataUtil::GetSMNoteDataString(NoteData &in)
|
||||
float fLastBeat = in.GetLastBeat();
|
||||
int iLastMeasure = int( fLastBeat/BEATS_PER_MEASURE );
|
||||
|
||||
CString sRet;
|
||||
CString sRet = "\n"; /* data begins on a new line when written to disk */
|
||||
|
||||
for( int m=0; m<=iLastMeasure; m++ ) // foreach measure
|
||||
{
|
||||
|
||||
@@ -104,7 +104,10 @@ void NotesWriterSM::WriteSMNotesTag( const Steps &in, FILE* fp )
|
||||
CStringArray asRadarValues;
|
||||
for( int r=0; r < NUM_RADAR_CATEGORIES; r++ )
|
||||
asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) );
|
||||
fprintf( fp, " %s:\n", join(",",asRadarValues).c_str() );
|
||||
/* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString.
|
||||
* If we add it here, then every time we write unmodified data we'll add an extra
|
||||
* newline and they'll accumulate. */
|
||||
fprintf( fp, " %s:", join(",",asRadarValues).c_str() );
|
||||
|
||||
fprintf( fp, "%s;\n", in.GetSMNoteData().c_str() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user