CFG: minor cleanup

This commit is contained in:
Nekotekina 2020-03-31 21:50:23 +03:00
parent 69d90f6fec
commit ba7f4af02b
3 changed files with 7 additions and 7 deletions

View File

@ -289,7 +289,7 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
if (YAML::convert<std::string>::decode(data, value))
{
rhs.from_string(value);
rhs.from_string(value, dynamic);
}
break; // ???

View File

@ -50,7 +50,7 @@ namespace cfg
_base(type _type);
// Owned entry constructor
_base(type _type, class node* owner, const std::string& name, bool dynamic = true);
_base(type _type, class node* owner, const std::string& name, bool dynamic);
public:
_base(const _base&) = delete;
@ -359,15 +359,15 @@ namespace cfg
}
};
// Simple set entry with mutex (TODO: template for various types)
// Simple set entry (TODO: template for various types)
class set_entry final : public _base
{
std::set<std::string> m_set;
public:
// Default value is empty list in current implementation
set_entry(node* owner, const std::string& name, bool dynamic = false)
: _base(type::set, owner, name, dynamic)
set_entry(node* owner, const std::string& name)
: _base(type::set, owner, name, false)
{
}
@ -402,7 +402,7 @@ namespace cfg
public:
log_entry(node* owner, const std::string& name)
: _base(type::log, owner, name)
: _base(type::log, owner, name, true)
{
}

View File

@ -321,7 +321,7 @@ void emu_settings::SaveSettings()
if (config_name == g_cfg.name || m_title_id == Emu.GetTitleID())
{
// Update current config
g_cfg.from_string(config.to_string(), true);
g_cfg.from_string(config.to_string(), !Emu.IsStopped());
if (!Emu.IsStopped()) // Don't spam the log while emulation is stopped. The config will be logged on boot anyway.
{