CFG: minor cleanup
This commit is contained in:
@@ -289,7 +289,7 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
|||||||
|
|
||||||
if (YAML::convert<std::string>::decode(data, value))
|
if (YAML::convert<std::string>::decode(data, value))
|
||||||
{
|
{
|
||||||
rhs.from_string(value);
|
rhs.from_string(value, dynamic);
|
||||||
}
|
}
|
||||||
|
|
||||||
break; // ???
|
break; // ???
|
||||||
|
|||||||
+5
-5
@@ -50,7 +50,7 @@ namespace cfg
|
|||||||
_base(type _type);
|
_base(type _type);
|
||||||
|
|
||||||
// Owned entry constructor
|
// 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:
|
public:
|
||||||
_base(const _base&) = delete;
|
_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
|
class set_entry final : public _base
|
||||||
{
|
{
|
||||||
std::set<std::string> m_set;
|
std::set<std::string> m_set;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Default value is empty list in current implementation
|
// Default value is empty list in current implementation
|
||||||
set_entry(node* owner, const std::string& name, bool dynamic = false)
|
set_entry(node* owner, const std::string& name)
|
||||||
: _base(type::set, owner, name, dynamic)
|
: _base(type::set, owner, name, false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ namespace cfg
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
log_entry(node* owner, const std::string& name)
|
log_entry(node* owner, const std::string& name)
|
||||||
: _base(type::log, owner, name)
|
: _base(type::log, owner, name, true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ void emu_settings::SaveSettings()
|
|||||||
if (config_name == g_cfg.name || m_title_id == Emu.GetTitleID())
|
if (config_name == g_cfg.name || m_title_id == Emu.GetTitleID())
|
||||||
{
|
{
|
||||||
// Update current config
|
// 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.
|
if (!Emu.IsStopped()) // Don't spam the log while emulation is stopped. The config will be logged on boot anyway.
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user