diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-21 15:30:34 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-21 15:31:28 -0500 |
commit | 91e2b5f88a2256e7af050933b5be9e95f35e5fa8 (patch) | |
tree | 680dd4718cee9540f5af93912403a43f766b635f | |
parent | 362769e967efa101eaea7aecf39791e70e68319e (diff) |
conform to new CP API
-rw-r--r-- | libs/surfaces/wiimote/wiimote.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/surfaces/wiimote/wiimote.cc b/libs/surfaces/wiimote/wiimote.cc index 68f2125dcb..963bf90df7 100644 --- a/libs/surfaces/wiimote/wiimote.cc +++ b/libs/surfaces/wiimote/wiimote.cc @@ -65,7 +65,8 @@ WiimoteControlProtocol::set_active (bool yn) DEBUG_TRACE (DEBUG::WiimoteControl, string_compose ("WiimoteControlProtocol::set_active init with yn: '%1'\n", yn)); /* do nothing if the active state is not changing */ - if (yn == _active) { + + if (yn == active()) { return 0; } @@ -77,8 +78,7 @@ WiimoteControlProtocol::set_active (bool yn) result = stop (); } - /* remember new active state */ - _active = yn; + ControlProtocol::set_active (yn); DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::set_active done\n"); @@ -88,10 +88,9 @@ WiimoteControlProtocol::set_active (bool yn) XMLNode& WiimoteControlProtocol::get_state () { - XMLNode *node = new XMLNode ("Protocol"); - node->add_property (X_("name"), ARDOUR::ControlProtocol::_name); - node->add_property (X_("feedback"), "0"); - return *node; + XMLNode& node (ControlProtocol::get_state()); + node.add_property (X_("feedback"), "0"); + return node; } int |