GPU: fix usage of bsearch

This commit is contained in:
Carter Li
2024-09-27 09:54:22 +08:00
parent 03565384e6
commit d6eff93c12
+2 -2
View File
@@ -124,9 +124,9 @@ static void parsePciIdsFile(const FFstrbuf* content, uint8_t subclass, uint16_t
}
#if FF_HAVE_EMBEDDED_PCIIDS
static inline int pciDeviceCmp(const FFPciDevice* a, const FFPciDevice* b)
static inline int pciDeviceCmp(const uint16_t* key, const FFPciDevice* element)
{
return (int) a->id - (int) b->id;
return (int) *key - (int) element->id;
}
static bool loadPciidsInc(uint8_t subclass, uint16_t vendor, uint16_t device, FFGPUResult* gpu)