mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
1. You can now toggle cheats with the ISO properties GUI.
2. Added "SetLines" function in the IniFile class. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1264 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -195,6 +195,16 @@ void IniFile::Set(const char* sectionName, const char* key, bool newValue)
|
||||
}
|
||||
|
||||
|
||||
void IniFile::SetLines(const char* sectionName, const std::vector<std::string> &lines)
|
||||
{
|
||||
Section* section = GetOrCreateSection(sectionName);
|
||||
section->lines.clear();
|
||||
|
||||
for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
|
||||
{
|
||||
section->lines.push_back(*iter);
|
||||
}
|
||||
}
|
||||
bool IniFile::Get(const char* sectionName, const char* key, std::string* value, const char* defaultValue)
|
||||
{
|
||||
Section* section = GetSection(sectionName);
|
||||
|
@ -55,6 +55,8 @@ public:
|
||||
void Set(const char* sectionName, const char* key, const std::string& newValue) {Set(sectionName, key, newValue.c_str());}
|
||||
void Set(const char* sectionName, const char* key, const std::vector<std::string>& newValues);
|
||||
|
||||
void SetLines(const char* sectionName, const std::vector<std::string> &lines);
|
||||
|
||||
// getter should be const
|
||||
bool Get(const char* sectionName, const char* key, std::string* value, const char* defaultValue = "");
|
||||
bool Get(const char* sectionName, const char* key, int* value, int defaultValue = 0);
|
||||
|
Reference in New Issue
Block a user