From 382c0cd7c347b40017f317ca8c1a38684c0b3be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 12 Jul 2025 15:16:36 +0800 Subject: [PATCH] GPU (Windows): ignore invalid temps --- src/detection/gpu/gpu_windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detection/gpu/gpu_windows.c b/src/detection/gpu/gpu_windows.c index 30b94a836..cf6cdb4ff 100644 --- a/src/detection/gpu/gpu_windows.c +++ b/src/detection/gpu/gpu_windows.c @@ -250,7 +250,8 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* .AdapterLuid = *(LUID*)&adapterLuid, .QueryPhysAdapter = { .PhysicalAdapterIndex = 0 }, }; - if (NT_SUCCESS(D3DKMTQueryStatistics(&queryStatistics))) + if (NT_SUCCESS(D3DKMTQueryStatistics(&queryStatistics)) && + queryStatistics.QueryResult.PhysAdapterInformation.AdapterPerfData.Temperature != 0) gpu->temperature = queryStatistics.QueryResult.PhysAdapterInformation.AdapterPerfData.Temperature / 10.0; }