Skip to content

Commit 23ec84b

Browse files
authored
Update libvulkan_loader.cpp
1 parent cbd1315 commit 23ec84b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/common/vulkan/libvulkan_loader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ void *OpenLibVulkan()
3434
#endif
3535
};
3636

37+
const char* dri = std::getenv("LIBGL_VK_DRI");
3738
constexpr SearchType kSearchTypes[] = {
3839
// On Android, Fuchsia and GGP we use the system libvulkan.
3940
#if defined(ANGLE_USE_CUSTOM_LIBVULKAN)
4041
SearchType::ModuleDir,
4142
#else
42-
(std::getenv("LIBGL_VK_DRI") && std::strcmp(std::getenv("LIBGL_VK_DRI"), "1") == 0) ? SearchType::AlreadyLoaded : SearchType::SystemDir,
43+
(dri && std::strcmp(dri, "1") == 0) ? SearchType::AlreadyLoaded : SearchType::SystemDir,
4344
#endif // defined(ANGLE_USE_CUSTOM_LIBVULKAN)
4445
};
4546

0 commit comments

Comments
 (0)