From 5a8956a39d9e0cb1cb52cb99f593d93b5db0d0d1 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 7 Aug 2026 03:17:18 +0000 Subject: [PATCH 24/38] gpu (Apple): skip IORegistryEntryGetRegistryEntryID before 10.6/on ppc Ported from https://github.com/macos-powerpc/powerpc-ports/blob/main/sysutils/fastfetch/files/0004-gpu_apple.-fix-for-older-systems.patch --- src/detection/gpu/gpu_apple.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/detection/gpu/gpu_apple.c b/src/detection/gpu/gpu_apple.c index f3775bc5a..80d1ed86a 100644 --- a/src/detection/gpu/gpu_apple.c +++ b/src/detection/gpu/gpu_apple.c @@ -2,6 +2,7 @@ #include "common/apple/cf_helpers.h" #include "common/apple/smc_temps.h" +#include #include const char* ffGpuDetectMetal(FFlist* gpus); @@ -120,7 +121,9 @@ const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus) { gpu->type = FF_GPU_TYPE_UNKNOWN; gpu->frequency = FF_GPU_FREQUENCY_UNSET; gpu->pcieSpeed = FF_GPU_PCIE_SPEED_UNSET; +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 && !defined(__ppc__) IORegistryEntryGetRegistryEntryID(registryEntry, &gpu->deviceId); +#endif ffStrbufInitStatic(&gpu->platformApi, "IOKit"); ffStrbufInit(&gpu->driver); // Ok for both Apple and Intel -- 2.43.0