Skip to content

Commit 382c0cd

Browse files
committed
GPU (Windows): ignore invalid temps
1 parent ab496b2 commit 382c0cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/detection/gpu/gpu_windows.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
250250
.AdapterLuid = *(LUID*)&adapterLuid,
251251
.QueryPhysAdapter = { .PhysicalAdapterIndex = 0 },
252252
};
253-
if (NT_SUCCESS(D3DKMTQueryStatistics(&queryStatistics)))
253+
if (NT_SUCCESS(D3DKMTQueryStatistics(&queryStatistics)) &&
254+
queryStatistics.QueryResult.PhysAdapterInformation.AdapterPerfData.Temperature != 0)
254255
gpu->temperature = queryStatistics.QueryResult.PhysAdapterInformation.AdapterPerfData.Temperature / 10.0;
255256
}
256257

0 commit comments

Comments
 (0)