DRTVWR-510 cache vulkan-detect result
parent
85a03549f1
commit
c19bb9beee
|
|
@ -588,16 +588,22 @@ void send_stats()
|
||||||
// False-positives and false-negatives are possible, but unlikely. We'll get a good
|
// False-positives and false-negatives are possible, but unlikely. We'll get a good
|
||||||
// approximation of Vulkan capability within current user systems from this. More
|
// approximation of Vulkan capability within current user systems from this. More
|
||||||
// detailed information on versions and extensions can come later.
|
// detailed information on versions and extensions can come later.
|
||||||
HMODULE vulkanDll = LoadLibraryExA("vulkan-1.dll", NULL, LOAD_LIBRARY_AS_DATAFILE);
|
static bool vulkan_oneshot = false;
|
||||||
if (NULL == vulkanDll)
|
static bool vulkan_detected = false;
|
||||||
|
|
||||||
|
if (!vulkan_oneshot)
|
||||||
{
|
{
|
||||||
misc["string_1"] = llformat("No Vulkan driver detected");
|
HMODULE vulkan_loader = LoadLibraryExA("vulkan-1.dll", NULL, LOAD_LIBRARY_AS_DATAFILE);
|
||||||
}
|
if (NULL != vulkan_loader)
|
||||||
else
|
{
|
||||||
{
|
vulkan_detected = true;
|
||||||
misc["string_1"] = llformat("Vulkan driver is detected");
|
FreeLibrary(vulkan_loader);
|
||||||
FreeLibrary(vulkanDll);
|
}
|
||||||
|
vulkan_oneshot = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
misc["string_1"] = vulkan_detected ? llformat("Vulkan driver is detected") : llformat("No Vulkan driver detected");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
misc["string_1"] = llformat("Unused");
|
misc["string_1"] = llformat("Unused");
|
||||||
#endif // LL_WINDOWS
|
#endif // LL_WINDOWS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue