The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/steamvr_lh: Allow overriding steamvr path with environment variable

To support use case such as:

* Non-standard steamvr install path.
* Using older steamvr versions to workaround breakage.
* Using steamvr driver with local modifications.

authored by

Yuxuan Shui and committed by
Simon Zeni
7e7e23df b562e3d3

+7 -1
+7 -1
src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
··· 713 713 // The driver likes to create a bunch of transient folder - lets make sure they're created where they normally 714 714 // are. 715 715 std::filesystem::current_path(STEAM_INSTALL_DIR + "/config/lighthouse"); 716 - std::string steamvr = find_steamvr_install(); 716 + std::string steamvr{}; 717 + if (getenv("STEAMVR_PATH") != nullptr) { 718 + steamvr = getenv("STEAMVR_PATH"); 719 + } else { 720 + steamvr = find_steamvr_install(); 721 + } 722 + 717 723 if (steamvr.empty()) { 718 724 U_LOG_IFL_E(level, "Could not find where SteamVR is installed!"); 719 725 return xrt_result::XRT_ERROR_DEVICE_CREATION_FAILED;