Add debugging output during mouse detection

This commit is contained in:
dokutan 2021-03-01 21:38:55 +01:00
parent b2cd1a9d69
commit a04dbcf705

View file

@ -46,6 +46,9 @@ rd_mouse::mouse_variant rd_mouse::detect(){
// Compare the VID and PID of the current device against the IDs of all mice
variant_loop< rd_mouse::mouse_variant >( [&](auto m){
// TODO! remove
std::cerr << m.get_name() << std::hex << "\t" << vid << ":" << pid << "\t" << (m.has_vid_pid(vid, pid) ? "true" : "false") << "\n";
if( m.has_vid_pid(vid, pid) ){
// setting the vid/pid is required for mice woth multiple ids and is ignored by all other backends
@ -96,6 +99,9 @@ rd_mouse::mouse_variant rd_mouse::detect( std::string mouse_name ){
// Compare the VID and PID of the current device against the IDs of all mice
variant_loop< rd_mouse::mouse_variant >( [&](auto m){
// TODO! remove
std::cerr << m.get_name() << std::hex << "\t" << vid << ":" << pid << "\t" << (m.has_vid_pid(vid, pid) && mouse_name == m.get_name() ? "true" : "false") << "\n";
if( m.has_vid_pid(vid, pid) && mouse_name == m.get_name() ){
// setting the vid/pid is required for mice woth multiple ids and is ignored by all other backends