1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Fix Steam RCT1 detection (#11543)

This commit is contained in:
Michael Steenbeek
2020-04-30 14:49:04 +02:00
committed by GitHub
parent bbe7ff0d80
commit 29fcdb5392

View File

@@ -889,14 +889,13 @@ bool Csg1datPresentAtLocation(const utf8* path)
std::string FindCsg1idatAtLocation(const utf8* path)
{
char checkPath[MAX_PATH];
safe_strcpy(checkPath, path, MAX_PATH);
safe_strcat_path(checkPath, "Data", MAX_PATH);
safe_strcat_path(checkPath, "CSG1I.DAT", MAX_PATH);
// Since Linux is case sensitive (and macOS sometimes too), make sure we handle case properly.
std::string resolvedPath = Path::ResolveCasing(checkPath);
return resolvedPath;
auto result1 = Path::ResolveCasing(Path::Combine(path, "Data", "CSG1I.DAT"));
if (!result1.empty())
{
return result1;
}
auto result2 = Path::ResolveCasing(Path::Combine(path, "RCTdeluxe_install", "Data", "CSG1I.DAT"));
return result2;
}
bool Csg1idatPresentAtLocation(const utf8* path)