mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-27 06:32:27 +00:00
Try to find a steam install for the base path
This commit is contained in:
parent
2052928433
commit
390b6a493d
1 changed files with 10 additions and 1 deletions
|
@ -346,12 +346,21 @@ bool Sys_GetPath(sysPath_t type, idStr &path) {
|
||||||
common->Warning("base path '%s' does not exits", s.c_str());
|
common->Warning("base path '%s' does not exits", s.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// fallback to vanilla doom3 install
|
// fallback to vanilla doom3 cd install
|
||||||
if (GetRegistryPath(buf, sizeof(buf), L"SOFTWARE\\id\\Doom 3", L"InstallPath") > 0) {
|
if (GetRegistryPath(buf, sizeof(buf), L"SOFTWARE\\id\\Doom 3", L"InstallPath") > 0) {
|
||||||
path = buf;
|
path = buf;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fallback to steam doom3 install
|
||||||
|
if (GetRegistryPath(buf, sizeof(buf), L"SOFTWARE\\Valve\\Steam", L"InstallPath") > 0) {
|
||||||
|
path = buf;
|
||||||
|
path.AppendPath("steamapps\\common\\doom 3");
|
||||||
|
|
||||||
|
if (_stat(path.c_str(), &st) != -1 && st.st_mode & _S_IFDIR)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
common->Warning("vanilla doom3 path not found");
|
common->Warning("vanilla doom3 path not found");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue