From 5c4627189814a90df85f064159265051972527b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 8 Feb 2023 21:23:45 +0800 Subject: [PATCH] GPU (Windows): fix driver version detection --- src/detection/gpu/gpu_windows.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/detection/gpu/gpu_windows.cpp b/src/detection/gpu/gpu_windows.cpp index d52984a0d..49d0b3e7e 100644 --- a/src/detection/gpu/gpu_windows.cpp +++ b/src/detection/gpu/gpu_windows.cpp @@ -60,7 +60,13 @@ static const char* detectWithRegistry(FFlist* gpus) uint64_t driverVersion; if(ffRegReadUint64(hSubKey, L"DriverVersion", &driverVersion, nullptr)) - ffStrbufSetF(&gpu->driver, "%" PRIu64 ".%" PRIu64, (driverVersion >> 16) & 0xFFFF, driverVersion & 0xFFFF); + { + ffStrbufSetF(&gpu->driver, "%" PRIu64 ".%" PRIu64 ".%" PRIu64 ".%" PRIu64, + (driverVersion >> 48) & 0xFFFF, + (driverVersion >> 32) & 0xFFFF, + (driverVersion >> 16) & 0xFFFF, + (driverVersion >> 0) & 0xFFFF); + } } return nullptr;