1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

RCT2 Steam path locator: improve OS support

Now looks for RCT2 install within OS-specific steam install directories.
Also checks the registry in Windows in case Steam has a custom install
path.
This commit is contained in:
Robert Jordan
2017-10-24 12:36:40 -04:00
committed by Michael Steenbeek
parent d924d771a6
commit c9c0c07eca
6 changed files with 109 additions and 0 deletions

View File

@@ -614,6 +614,17 @@ namespace Config
return location;
}
}
utf8 steamPath[2048] = { 0 };
if (platform_get_steam_path(steamPath, sizeof(steamPath)))
{
std::string location = Path::Combine(steamPath, "Rollercoaster Tycoon 2");
if (platform_original_game_data_exists(location.c_str()))
{
return location;
}
}
if (platform_original_game_data_exists(gExePath))
{
return gExePath;