mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
37 lines
648 B
C++
37 lines
648 B
C++
#include <Config/Settings/DisplayRefreshRate.h>
|
|
|
|
namespace Config
|
|
{
|
|
namespace Settings
|
|
{
|
|
DisplayRefreshRate::DisplayRefreshRate()
|
|
: MappedSetting("DisplayRefreshRate", "app", { {"app", APP}, {"desktop", DESKTOP} })
|
|
{
|
|
}
|
|
|
|
std::string DisplayRefreshRate::getValueStr() const
|
|
{
|
|
try
|
|
{
|
|
return MappedSetting::getValueStr();
|
|
}
|
|
catch (const ParsingError&)
|
|
{
|
|
return std::to_string(m_value);
|
|
}
|
|
}
|
|
|
|
void DisplayRefreshRate::setValue(const std::string& value)
|
|
{
|
|
try
|
|
{
|
|
MappedSetting::setValue(value);
|
|
}
|
|
catch (const ParsingError&)
|
|
{
|
|
m_value = Parser::parseInt(value, 1, MAXINT);
|
|
}
|
|
}
|
|
}
|
|
}
|