mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
GPU: hard codes QEMU virtual GPU
This commit is contained in:
@@ -22,6 +22,7 @@ const char* FF_GPU_VENDOR_NAME_LOONGSON = "Loongson";
|
||||
const char* FF_GPU_VENDOR_NAME_JINGJIA_MICRO = "Jingjia Micro";
|
||||
const char* FF_GPU_VENDOR_NAME_HUAWEI = "Huawei";
|
||||
const char* FF_GPU_VENDOR_NAME_ZHAOXIN = "Zhaoxin";
|
||||
const char* FF_GPU_VENDOR_NAME_QEMU = "QEMU";
|
||||
|
||||
const char* ffGPUGetVendorString(unsigned vendorId) {
|
||||
// https://devicehunt.com/all-pci-vendors
|
||||
@@ -69,6 +70,8 @@ const char* ffGPUGetVendorString(unsigned vendorId) {
|
||||
return FF_GPU_VENDOR_NAME_HUAWEI;
|
||||
case 0x1d17:
|
||||
return FF_GPU_VENDOR_NAME_ZHAOXIN;
|
||||
case 0x1234: // https://admin.pci-ids.ucw.cz/read/PC/1234
|
||||
return FF_GPU_VENDOR_NAME_QEMU;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ extern const char* FF_GPU_VENDOR_NAME_LOONGSON;
|
||||
extern const char* FF_GPU_VENDOR_NAME_JINGJIA_MICRO;
|
||||
extern const char* FF_GPU_VENDOR_NAME_HUAWEI;
|
||||
extern const char* FF_GPU_VENDOR_NAME_ZHAOXIN;
|
||||
extern const char* FF_GPU_VENDOR_NAME_QEMU;
|
||||
|
||||
typedef struct FFGPUMemory {
|
||||
uint64_t total;
|
||||
|
||||
@@ -199,6 +199,11 @@ static bool loadPciidsInc(uint8_t subclass, uint16_t vendor, uint16_t device, FF
|
||||
#endif
|
||||
|
||||
void ffGPUFillVendorAndName(uint8_t subclass, uint16_t vendor, uint16_t device, FFGPUResult* gpu) {
|
||||
if (vendor == 0x1234 && device == 0x1111 && subclass == 0) { // Not exist in pci.ids
|
||||
ffStrbufSetStatic(&gpu->name, "Virtual Video Controller");
|
||||
return;
|
||||
}
|
||||
|
||||
#if FF_HAVE_EMBEDDED_PCIIDS
|
||||
bool ok = loadPciidsInc(subclass, vendor, device, gpu);
|
||||
if (ok) {
|
||||
|
||||
Reference in New Issue
Block a user