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

Method GetFloatValue

pcsx2/INISettingsInterface.cpp:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170bool INISettingsInterface::GetFloatValue(const char* section, const char* key, float* value) const
171{
172 const char* str_value = m_ini.GetValue(section, key);
173 if (!str_value)
174 return false;
175
176 std::optional<float> parsed_value = StringUtil::FromChars<float>(str_value);
177 if (!parsed_value.has_value())
178 return false;
179
180 *value = parsed_value.value();
181 return true;
182}
183
184bool INISettingsInterface::GetDoubleValue(const char* section, const char* key, double* value) const
185{

Callers 15

BindWidgetToFloatSettingFunction · 0.45
initializeSpeedComboMethod · 0.45
getFloatValueMethod · 0.45
GetFloatSettingValueMethod · 0.45
AddPadBindingsMethod · 0.45
AddUSBBindingsMethod · 0.45

Calls 2

GetValueMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected