input: restore original defaults when changing pad handlers

This fixes the vibration threshold being 0 when going to DS3 and back.
Probably also fixes a lot of other tiny bugs.
This commit is contained in:
Megamouse
2025-09-10 19:31:08 +02:00
parent 735588aa1a
commit b3d5493a6b
5 changed files with 102 additions and 23 deletions
+5 -12
View File
@@ -553,19 +553,12 @@ void cfg::node::from_default()
}
}
void cfg::_bool::from_default()
void cfg::node::restore_defaults()
{
m_value = def;
}
void cfg::string::from_default()
{
m_value = def;
}
void cfg::set_entry::from_default()
{
m_set = {};
for (auto& node : m_nodes)
{
node->restore_defaults();
}
}
std::string cfg::map_entry::get_value(std::string_view key)