Skip null device table entries

This commit is contained in:
Luke Usher 2017-11-19 19:20:38 +00:00 committed by PatrickvL
parent ce0897091a
commit f519674873
1 changed files with 5 additions and 0 deletions

View File

@ -118,6 +118,11 @@ void SetupXboxDeviceTypes()
// Iterate through the table until we find gamepad
XTL::PXID_TYPE_INFORMATION* deviceTable = (XTL::PXID_TYPE_INFORMATION*)(deviceTableStartOffset);
for (unsigned int i = 0; i < deviceTableEntryCount; i++) {
// Skip empty table entries
if (deviceTable[i] == nullptr) {
continue;
}
printf("----------------------------------------\n");
printf("DeviceTable[%u]->ucType = %d\n", i, deviceTable[i]->ucType);
printf("DeviceTable[%u]->XppType = 0x%08X (", i, deviceTable[i]->XppType);