steam_helper: Fix XDG_CONFIG_HOME handling

This commit is contained in:
Andrew Eikum 2020-03-23 09:39:44 -05:00
parent 60b53f915d
commit 07860b2473

View file

@ -124,19 +124,21 @@ static std::string get_linux_vr_path(void)
{
const char *e;
static const char *openvr_path = "/openvr/openvrpaths.vrpath";
e = getenv("VR_PATHREG_OVERRIDE");
if(e && *e)
return e;
e = getenv("XDG_CONFIG_HOME");
if(e && *e)
return std::string(e) + openvr_path;
if(!e || !*e)
e = getenv("HOME");
e = getenv("HOME");
if(e && *e)
return std::string(e) + "/.config" + openvr_path;
if(!e || !*e)
return "";
return std::string(e) + "/.config/openvr/openvrpaths.vrpath";
return "";
}
static bool get_windows_vr_path(WCHAR *out_path, bool create)