Created
October 19, 2015 11:37
-
-
Save anonymous/836ec84e046a5866874c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct hid_device_info *devs, *cur_dev; | |
std::vector<HIDDeviceInfo> founded; | |
while(!stopped){ | |
devs = hid_enumerate(0x0, 0x0); | |
cur_dev = devs; | |
founded.clear(); | |
while (cur_dev) { | |
qDebug("VID = %04hX PID = %04hX", cur_dev->vendor_id, cur_dev->product_id); | |
HIDDeviceInfo hid_device(cur_dev); //достаточно закомментировать эту строку и перестает падать | |
founded.push_back(hid_device); | |
cur_dev = cur_dev->next; //перед падением структура cur_dev содержит хуиту, но достаточно убрать строку 9 и 10 и все ок | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment