From 91e2b5f88a2256e7af050933b5be9e95f35e5fa8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 21 Dec 2013 15:30:34 -0500 Subject: conform to new CP API --- libs/surfaces/wiimote/wiimote.cc | 13 ++++++------- 1 file 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 -- cgit v1.2.3