13
0

add required request buffer factory for Wiimote

This commit is contained in:
Paul Davis 2015-12-28 11:13:04 -05:00
parent 0d9efc1148
commit e2f6c59639
3 changed files with 22 additions and 1 deletions

View File

@ -48,6 +48,12 @@ probe_wiimote_protocol (ControlProtocolDescriptor*)
{
return WiimoteControlProtocol::probe ();
}
static void*
wiimote_request_buffer_factory (uint32_t num_requests)
{
return WiimoteControlProtocol::request_factory (num_requests);
}
static ControlProtocolDescriptor wiimote_descriptor = {
name : "Wiimote",
@ -58,7 +64,8 @@ static ControlProtocolDescriptor wiimote_descriptor = {
supports_feedback : false,
probe : probe_wiimote_protocol,
initialize : new_wiimote_protocol,
destroy : delete_wiimote_protocol
destroy : delete_wiimote_protocol,
request_buffer_factory : wiimote_request_buffer_factory
};
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &wiimote_descriptor; }

View File

@ -455,3 +455,15 @@ wiimote_control_protocol_mesg_callback (cwiid_wiimote_t *wiimote, int mesg_count
DEBUG_TRACE (DEBUG::WiimoteControl, "WiimoteControlProtocol::mesg_callback done\n");
}
void*
WiimoteControlProtocol::request_factory (uint32_t num_requests)
{
/* AbstractUI<T>::request_buffer_factory() is a template method only
instantiated in this source module. To provide something visible for
use in the interface/descriptor, we have this static method that is
template-free.
*/
return request_buffer_factory (num_requests);
}

View File

@ -43,6 +43,8 @@ public:
virtual ~WiimoteControlProtocol ();
static bool probe ();
static void* request_factory (uint32_t);
int set_active (bool yn);
XMLNode& get_state ();