diff --git a/rpcs3/Input/ds4_pad_handler.cpp b/rpcs3/Input/ds4_pad_handler.cpp index 663a7e3c85..bb46032677 100644 --- a/rpcs3/Input/ds4_pad_handler.cpp +++ b/rpcs3/Input/ds4_pad_handler.cpp @@ -571,6 +571,7 @@ void ds4_pad_handler::check_add_device(hid_device* hidDevice, std::string_view p { hw_version = read_u32(&buf[35]); fw_version = read_u32(&buf[41]); + ds4_log.notice("check_add_device: Got firmware version: hw_version: 0x%x, fw_version: 0x%x", hw_version, fw_version); } if (hid_set_nonblocking(hidDevice, 1) == -1) diff --git a/rpcs3/Input/hid_pad_handler.cpp b/rpcs3/Input/hid_pad_handler.cpp index d241feed31..86596f5151 100644 --- a/rpcs3/Input/hid_pad_handler.cpp +++ b/rpcs3/Input/hid_pad_handler.cpp @@ -134,7 +134,11 @@ void hid_pad_handler::enumerate_devices() hid_device_info* head = dev_info; while (dev_info) { - ensure(dev_info->path != nullptr); + if (!dev_info->path) + { + hid_log.error("Skipping enumeration of device with empty path."); + continue; + } device_paths.insert(dev_info->path); serials[dev_info->path] = dev_info->serial_number ? std::wstring_view(dev_info->serial_number) : std::wstring_view{}; dev_info = dev_info->next; @@ -188,6 +192,15 @@ void hid_pad_handler::update_devices() hid_device* dev = hid_open_path(path.c_str()); if (dev) { + if (const hid_device_info* info = hid_get_device_info(dev)) + { + hid_log.notice("%s adding device: vid=0x%x, pid=0x%x, serial='%s', path='%s'", m_type, info->vendor_id, info->product_id, m_enumerated_serials[path].data(), path); + } + else + { + hid_log.warning("%s adding device: vid=N/A, pid=N/A, serial='%s', path='%s'", m_type, m_enumerated_serials[path].data(), path); + } + check_add_device(dev, path, m_enumerated_serials[path]); } else