diff --git a/src/detection/gpu/gpu_linux.c b/src/detection/gpu/gpu_linux.c index 6c9ba71f4..f469d08cc 100644 --- a/src/detection/gpu/gpu_linux.c +++ b/src/detection/gpu/gpu_linux.c @@ -524,14 +524,14 @@ static const char* pciDetectGPUs(const FFGPUOptions* options, FFlist* gpus) const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus) { + #ifdef FF_HAVE_DIRECTX_HEADERS + const char* ffGPUDetectByDirectX(const FFGPUOptions* options, FFlist* gpus); + if (ffGPUDetectByDirectX(options, gpus) == NULL) + return NULL; + #endif + if (options->detectionMethod == FF_GPU_DETECTION_METHOD_AUTO) { - #ifdef FF_HAVE_DIRECTX_HEADERS - const char* ffGPUDetectByDirectX(const FFGPUOptions* options, FFlist* gpus); - if (ffGPUDetectByDirectX(options, gpus) == NULL) - return NULL; - #endif - if (drmDetectGPUs(options, gpus) == NULL && gpus->length > 0) return NULL; } diff --git a/src/detection/gpu/gpu_wsl.cpp b/src/detection/gpu/gpu_wsl.cpp index 152b7dba0..bc41d351d 100644 --- a/src/detection/gpu/gpu_wsl.cpp +++ b/src/detection/gpu/gpu_wsl.cpp @@ -28,7 +28,7 @@ private: extern "C" const char* ffGPUDetectByDirectX(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* gpus) { - FF_LIBRARY_LOAD(libdxcore, nullptr, "dlopen libdxcore.so failed. Make sure WSLg is enabled", "/usr/lib/wsl/lib/libdxcore" FF_LIBRARY_EXTENSION, 4) + FF_LIBRARY_LOAD(libdxcore, nullptr, "dlopen libdxcore.so failed", "/usr/lib/wsl/lib/libdxcore" FF_LIBRARY_EXTENSION, 4) // DXCoreCreateAdapterFactory is a reloaded function, so we can't use FF_LIBRARY_LOAD_SYMBOL_MESSAGE here typedef HRESULT (*DXCoreCreateAdapterFactory_t)(REFIID riid, void** ppvFactory);