|
|
@ -496,6 +496,12 @@ HidHide::SmallHidInfo HidHide::GetDeviceInfo(const DeviceInstancePath& instance_
|
|
|
|
res.name = (HidD_GetProductString(device_object.get(), buffer.data(), static_cast<ULONG>(sizeof(WCHAR) * buffer.size()))
|
|
|
|
res.name = (HidD_GetProductString(device_object.get(), buffer.data(), static_cast<ULONG>(sizeof(WCHAR) * buffer.size()))
|
|
|
|
? buffer
|
|
|
|
? buffer
|
|
|
|
: L"");
|
|
|
|
: L"");
|
|
|
|
|
|
|
|
for (size_t i = 0; i < res.name.size(); ++i) {
|
|
|
|
|
|
|
|
if (res.name[i] == L'\0') {
|
|
|
|
|
|
|
|
res.name.resize(i + 1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// Valve emulated gamepad PID/VID; mirrord by ViGEm
|
|
|
|
// Valve emulated gamepad PID/VID; mirrord by ViGEm
|
|
|
|
if (attributes.VendorID == 0x28de /* && attributes.ProductID == 0x11FF*/) {
|
|
|
|
if (attributes.VendorID == 0x28de /* && attributes.ProductID == 0x11FF*/) {
|
|
|
|
res.name = std::wstring(L"ViGEm Emulated: ") + res.name;
|
|
|
|
res.name = std::wstring(L"ViGEm Emulated: ") + res.name;
|
|
|
|