mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
UDPWii: Broadcasting it's presence on IPv4 to 255.255.255.255 once every 1.5 seconds. 3-arg Set()-s only worked on strings and doubles :P . Added int and bool variants.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5916 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -119,6 +119,22 @@ void IniFile::Section::Set(const char* key, const float newValue, const float de
|
||||
Delete(key);
|
||||
}
|
||||
|
||||
void IniFile::Section::Set(const char* key, int newValue, int defaultValue)
|
||||
{
|
||||
if (newValue != defaultValue)
|
||||
Set(key, newValue);
|
||||
else
|
||||
Delete(key);
|
||||
}
|
||||
|
||||
void IniFile::Section::Set(const char* key, bool newValue, bool defaultValue)
|
||||
{
|
||||
if (newValue != defaultValue)
|
||||
Set(key, newValue);
|
||||
else
|
||||
Delete(key);
|
||||
}
|
||||
|
||||
void IniFile::Section::Set(const char* key, const std::vector<std::string>& newValues)
|
||||
{
|
||||
std::string temp;
|
||||
|
@ -56,9 +56,13 @@ public:
|
||||
void Set(const char* key, double newValue) {
|
||||
Set(key, StringFromFormat("%f", newValue).c_str());
|
||||
}
|
||||
|
||||
void Set(const char* key, int newValue, int defaultValue);
|
||||
void Set(const char* key, int newValue) {
|
||||
Set(key, StringFromInt(newValue).c_str());
|
||||
}
|
||||
|
||||
void Set(const char* key, bool newValue, bool defaultValue);
|
||||
void Set(const char* key, bool newValue) {
|
||||
Set(key, StringFromBool(newValue).c_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user