mirror of
https://github.com/decaf-emu/decaf-emu.git
synced 2026-10-11 16:18:14 +00:00
34 lines
596 B
C++
34 lines
596 B
C++
#include "config.h"
|
|
|
|
namespace config
|
|
{
|
|
|
|
namespace system
|
|
{
|
|
|
|
int timeout_ms = 0;
|
|
|
|
} // namespace system
|
|
|
|
bool
|
|
loadFrontendToml(std::shared_ptr<cpptoml::table> config)
|
|
{
|
|
system::timeout_ms = config->get_qualified_as<int>("system.timeout_ms").value_or(system::timeout_ms);
|
|
return true;
|
|
}
|
|
|
|
bool
|
|
saveFrontendToml(std::shared_ptr<cpptoml::table> config)
|
|
{
|
|
auto system = config->get_table("system");
|
|
if (!system) {
|
|
system = cpptoml::make_table();
|
|
}
|
|
|
|
system->insert("timeout_ms", system::timeout_ms);
|
|
config->insert("system", system);
|
|
return true;
|
|
}
|
|
|
|
} // namespace config
|