From ff170caff69c4a39a035a256673b49f55fa5137b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 9 Feb 2023 09:46:53 +0800 Subject: [PATCH] GPU (Windows): fix duplicated entries. --- src/detection/gpu/gpu_windows.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detection/gpu/gpu_windows.cpp b/src/detection/gpu/gpu_windows.cpp index 4146fc53e..8e6d74ef2 100644 --- a/src/detection/gpu/gpu_windows.cpp +++ b/src/detection/gpu/gpu_windows.cpp @@ -149,8 +149,9 @@ extern "C" const char* ffDetectGPUImpl(FFlist* gpus, FF_MAYBE_UNUSED const FFinstance* instance) { if (instance->config.allowSlowOperations) - detectWithWmi(gpus); - else if (!detectWithRegistry(gpus)) + return detectWithWmi(gpus); + + if (!detectWithRegistry(gpus)) return nullptr; return detectWithDxgi(gpus); }