Project64-input: Ignore empty button on device name
This commit is contained in:
parent
f218c2bfc9
commit
9d3bbe4659
|
@ -310,6 +310,7 @@ std::wstring CDirectInput::ControllerDevices(const N64CONTROLLER & Controller)
|
|||
};
|
||||
typedef std::set<GUID, GUIDComparer> GUID_LIST;
|
||||
GUID_LIST DeviceGuids;
|
||||
GUID EmptyGuid = { 0 };
|
||||
|
||||
for (size_t i = 0, n = sizeof(Buttons) / sizeof(Buttons[0]); i < n; i++)
|
||||
{
|
||||
|
@ -318,6 +319,10 @@ std::wstring CDirectInput::ControllerDevices(const N64CONTROLLER & Controller)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if (memcmp(&Buttons[i]->DeviceGuid, &EmptyGuid, sizeof(EmptyGuid)) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
DeviceGuids.insert(Buttons[i]->DeviceGuid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue