From 653e689f18678c8ff379b2212f839f02b42c8fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 11 Jan 2024 09:53:20 +0800 Subject: [PATCH] GPU (macOS): tidy --- src/detection/gpu/gpu_apple.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/detection/gpu/gpu_apple.m b/src/detection/gpu/gpu_apple.m index 1079ff1e0..951d25469 100644 --- a/src/detection/gpu/gpu_apple.m +++ b/src/detection/gpu/gpu_apple.m @@ -15,7 +15,7 @@ const char* ffGpuDetectMetal(FFlist* gpus) FFGPUResult* gpu = NULL; FF_LIST_FOR_EACH(FFGPUResult, x, *gpus) { - if (x->deviceId == device.registryID || ffStrbufEqualS(&x->name, device.name.UTF8String)) + if (x->deviceId == device.registryID) { gpu = x; break; @@ -34,7 +34,7 @@ const char* ffGpuDetectMetal(FFlist* gpus) gpu->type = device.hasUnifiedMemory ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE; } + return NULL; } - - return NULL; + return "Metal API is not supported by this macOS version"; }