diff --git a/CHANGELOG.md b/CHANGELOG.md index dffee431f..47a9f1a7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ Features: * Support `--localip-compact-type` option (#408) * Terminator terminal font detection (@Zerogiven, #415) * Windows 32bit compatibility +* Support global configuration in MSYS2 environment (Windows) +* Support GPU driver version detection on Windows 11 Bugfixes: diff --git a/src/detection/gpu/gpu.h b/src/detection/gpu/gpu.h index 177ca2e31..5d38ca1ac 100644 --- a/src/detection/gpu/gpu.h +++ b/src/detection/gpu/gpu.h @@ -27,6 +27,7 @@ typedef struct FFGPUResult FFstrbuf name; FFstrbuf driver; double temperature; + uint64_t memory; int coreCount; } FFGPUResult; diff --git a/src/detection/gpu/gpu_windows.cpp b/src/detection/gpu/gpu_windows.cpp index 8788aa1e6..d52984a0d 100644 --- a/src/detection/gpu/gpu_windows.cpp +++ b/src/detection/gpu/gpu_windows.cpp @@ -6,6 +6,7 @@ extern "C" { #include #include +#include static const char* detectWithRegistry(FFlist* gpus) { @@ -13,11 +14,11 @@ static const char* detectWithRegistry(FFlist* gpus) FF_HKEY_AUTO_DESTROY hKey = NULL; if(!ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectX", &hKey, nullptr)) - return "Open \"SOFTWARE\\Microsoft\\DirectX\" failed"; + return "Open \"HKLM\\SOFTWARE\\Microsoft\\DirectX\" failed"; uint64_t lastSeen; if(!ffRegReadUint64(hKey, L"LastSeen", &lastSeen, nullptr)) - return "Read \"SOFTWARE\\Microsoft\\DirectX\\LastSeen\" failed"; + return "Read \"HKLM\\SOFTWARE\\Microsoft\\DirectX\\LastSeen\" failed"; DWORD index = 0; wchar_t subKeyName[64]; @@ -55,9 +56,11 @@ static const char* detectWithRegistry(FFlist* gpus) uint64_t dedicatedVideoMemory; if(ffRegReadUint64(hSubKey, L"DedicatedVideoMemory", &dedicatedVideoMemory, nullptr)) - { gpu->type = dedicatedVideoMemory >= 1024 * 1024 * 1024 ? FF_GPU_TYPE_DISCRETE : FF_GPU_TYPE_INTEGRATED; - } + + uint64_t driverVersion; + if(ffRegReadUint64(hSubKey, L"DriverVersion", &driverVersion, nullptr)) + ffStrbufSetF(&gpu->driver, "%" PRIu64 ".%" PRIu64, (driverVersion >> 16) & 0xFFFF, driverVersion & 0xFFFF); } return nullptr;