From 57e34926fbf24d6d69ff00f734e6e90d7091eb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 13 Aug 2024 14:51:56 +0800 Subject: [PATCH] GPU (Windows): add some debug log --- src/detection/gpu/gpu_windows.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detection/gpu/gpu_windows.c b/src/detection/gpu/gpu_windows.c index d4d616c1e..69591fa46 100644 --- a/src/detection/gpu/gpu_windows.c +++ b/src/detection/gpu/gpu_windows.c @@ -56,21 +56,25 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* unsigned vendorId = 0, deviceId = 0, subSystemId = 0, revId = 0; swscanf(buffer, L"PCI\\VEN_%x&DEV_%x&SUBSYS_%x&REV_%x", &vendorId, &deviceId, &subSystemId, &revId); ffStrbufSetStatic(&gpu->vendor, ffGetGPUVendorString(vendorId)); + _putws(buffer); FF_HKEY_AUTO_DESTROY hVideoIdKey = SetupDiOpenDevRegKey(hdev, &did, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_QUERY_VALUE); if (!hVideoIdKey) continue; DWORD videoIdLength = sizeof(buffer); if (RegGetValueW(hVideoIdKey, NULL, L"VideoID", RRF_RT_REG_SZ, NULL, buffer, &videoIdLength) != ERROR_SUCCESS) continue; + _putws(buffer); if (videoIdLength != (FF_GUID_STRLEN + 1) * sizeof(wchar_t)) continue; // Should not happen wmemcpy(regControlVideoKey + regControlVideoKeyPrefixLength, buffer, FF_GUID_STRLEN); + _putws(regControlVideoKey); FF_HKEY_AUTO_DESTROY hRegControlVideoKey = NULL; if (!ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, regControlVideoKey, &hRegControlVideoKey, NULL)) continue; wmemcpy(regDirectxKey + regDirectxKeyPrefixLength, buffer, FF_GUID_STRLEN); + _putws(regDirectxKey); FF_HKEY_AUTO_DESTROY hDirectxKey = NULL; if (ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, regDirectxKey, &hDirectxKey, NULL)) {