MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / SetDefaultValue

Method SetDefaultValue

pcsx2/Pcsx2Config.cpp:101–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void SettingInfo::SetDefaultValue(SettingsInterface* si, const char* section, const char* key) const
102{
103 switch (type)
104 {
105 case SettingInfo::Type::Boolean:
106 si->SetBoolValue(section, key, BooleanDefaultValue());
107 break;
108 case SettingInfo::Type::Integer:
109 case SettingInfo::Type::IntegerList:
110 si->SetIntValue(section, key, IntegerDefaultValue());
111 break;
112 case SettingInfo::Type::Float:
113 si->SetFloatValue(section, key, FloatDefaultValue());
114 break;
115 case SettingInfo::Type::String:
116 case SettingInfo::Type::StringList:
117 case SettingInfo::Type::Path:
118 si->SetStringValue(section, key, StringDefaultValue());
119 break;
120 default:
121 break;
122 }
123}
124
125void SettingInfo::CopyValue(SettingsInterface* dest_si, const SettingsInterface& src_si,
126 const char* section, const char* key) const

Callers

nothing calls this directly

Calls 4

SetBoolValueMethod · 0.45
SetIntValueMethod · 0.45
SetFloatValueMethod · 0.45
SetStringValueMethod · 0.45

Tested by

no test coverage detected