Skip to content

Commit

Permalink
also send device id with element info message
Browse files Browse the repository at this point in the history
  • Loading branch information
Marije Baalman committed Sep 12, 2013
1 parent db6cbcf commit 5eb06f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hidapi2osc/hidapi2osc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,10 @@ lo_message get_hid_info_msg( struct hid_device_info * info )
return m1;
}

lo_message get_hid_element_info_msg( hid_device_element * el )
lo_message get_hid_element_info_msg( hid_device_element * el, int devid )
{
lo_message m1 = lo_message_new();
lo_message_add_int32( m1, devid );
lo_message_add_int32( m1, el->index );
lo_message_add_int32( m1, el->usage_page );
lo_message_add_int32( m1, el->usage );
Expand Down Expand Up @@ -339,7 +340,7 @@ void send_elements_hid_info(int joy_idx)
hid_device_element * cur_element = hid->descriptor->first;

while (cur_element) {
lo_message m2 = get_hid_element_info_msg( cur_element );
lo_message m2 = get_hid_element_info_msg( cur_element, joy_idx );
lo_bundle_add_message( b, "/hid/element/info", m2 );
cur_element = cur_element->next;
}
Expand Down

0 comments on commit 5eb06f0

Please sign in to comment.