Fixing memory leaks in controllers

This commit is contained in:
morg 2021-02-05 12:37:17 +01:00
parent aa59c6132e
commit dba814215d
165 changed files with 444 additions and 71 deletions

View file

@ -93,14 +93,8 @@ void DetectLogitechKeyboardG810(hid_device_info* info, const std::string& name)
else
{
// Not all of them could be opened, do some cleanup
if(dev_usage_0x0602)
{
hid_close(dev_usage_0x0602);
}
if(dev_usage_0x0604)
{
hid_close(dev_usage_0x0604);
}
hid_close(dev_usage_0x0602);
hid_close(dev_usage_0x0604);
}
#else
hid_device* dev = hid_open_path(info->path);