rationalize save/restore of control surface "feedback" property

This commit is contained in:
Paul Davis
2015-06-24 13:46:07 -04:00
parent 2b81d4d0fe
commit 2ea5962af2
6 changed files with 31 additions and 21 deletions

View File

@@ -374,6 +374,19 @@ ControlProtocol::get_state ()
XMLNode* node = new XMLNode (state_node_name);
node->add_property ("name", _name);
node->add_property ("feedback", get_feedback() ? "yes" : "no");
return *node;
}
int
ControlProtocol::set_state (XMLNode const & node, int /* version */)
{
const XMLProperty* prop;
if ((prop = node.property ("feedback")) != 0) {
set_feedback (string_is_affirmative (prop->value()));
}
return 0;
}