diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index c93d514f16..b45004ec1e 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -434,17 +434,20 @@ void InputMapper::SaveMappingsToDisk() ini.DeleteKey( GAMESTATE->GetCurrentGame()->m_szName ); // iterate over our input map and write all mappings to the ini file - for( int i=0; i asValues; + for( unsigned button = 0; button < NUM_GAME_TO_DEVICE_SLOTS; ++button ) + asValues.push_back( m_GItoDI[i][j][button].toString() ); + while( asValues.size() && asValues.back() == "" ) + asValues.erase( asValues.begin()+asValues.size()-1 ); + CString sValueString = join( ",", asValues ); + ini.SetValue( GAMESTATE->GetCurrentGame()->m_szName, sNameString, sValueString ); } }