nJoy: Configuration bugfixes, and show the digital shoulder button status in the advanced settings to

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1945 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-01-20 06:38:29 +00:00
parent 00bca8d807
commit 6f4cbb89f9
7 changed files with 55 additions and 30 deletions

View File

@ -41,8 +41,10 @@ Config g_Config;
Config::Config()
{
//memset(this, 0, sizeof(Config)); // Clear the memory
bSaveByID.resize(4); // Set vector size
bSquareToCircle.resize(4); // Set vector size
bSquareToCircle.resize(4);
SDiagonal.resize(4);
}
@ -224,8 +226,8 @@ void Config::Save(bool CheckedForDuplicates)
file.Set(SectionName.c_str(), "TriggerType", joysticks[i].triggertype);
file.Set(SectionName.c_str(), "eventnum", joysticks[i].eventnum);
file.Set(SectionName.c_str(), "Diagonal", g_Config.SDiagonal);
file.Set(SectionName.c_str(), "SquareToCircle", g_Config.bSquareToCircle.at(i));
file.Set(SectionName.c_str(), "Diagonal", g_Config.SDiagonal.at(i).c_str());
file.Set(SectionName.c_str(), "SquareToCircle", g_Config.bSquareToCircle.at(i));
}
file.Save("nJoy.ini");
@ -299,7 +301,7 @@ void Config::Load(bool config)
file.Get(SectionName.c_str(), "TriggerType", &joysticks[i].triggertype, 0);
file.Get(SectionName.c_str(), "eventnum", &joysticks[i].eventnum, 0);
file.Get(SectionName.c_str(), "Diagonal", &g_Config.SDiagonal, "100%");
file.Get(SectionName.c_str(), "Diagonal", &g_Config.SDiagonal.at(i), "100%");
file.Get(SectionName.c_str(), "SquareToCircle", &Tmp, false); g_Config.bSquareToCircle.at(i) = Tmp;
}
}