From 3e56caf1b190e158d6faa05da1a9d4817a8f157c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 7 Oct 2011 12:48:21 -0500 Subject: [PATCH] empty meter fixes for DWI/KSF; KSF is more of a 'it used to be 0, now it's 1' thing --- src/NotesLoaderDWI.cpp | 6 +++++- src/NotesLoaderKSF.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NotesLoaderDWI.cpp b/src/NotesLoaderDWI.cpp index ea6aa58e28..c97c39464f 100644 --- a/src/NotesLoaderDWI.cpp +++ b/src/NotesLoaderDWI.cpp @@ -426,10 +426,14 @@ static bool LoadFromDWITokens( out.m_StepsType = GetTypeFromMode(sMode); + // if the meter is empty, force it to 1. + if( sNumFeet.empty() ) + sNumFeet = "1"; + out.SetMeter(StringToInt(sNumFeet)); out.SetDifficulty( DwiCompatibleStringToDifficulty(sDescription) ); - + out.SetNoteData( ParseNoteData(sStepData1, sStepData2, out, sPath) ); out.TidyUpData(); diff --git a/src/NotesLoaderKSF.cpp b/src/NotesLoaderKSF.cpp index 06a21e0000..24c6856398 100644 --- a/src/NotesLoaderKSF.cpp +++ b/src/NotesLoaderKSF.cpp @@ -141,7 +141,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, Song &song, bool else if( sValueName=="DIFFICULTY" ) { - out.SetMeter( max(StringToInt(sParams[1]), 0) ); + out.SetMeter( max(StringToInt(sParams[1]), 1) ); } // new cases from Aldo_MX's fork: else if( sValueName=="PLAYER" )