| 765 | } |
| 766 | |
| 767 | static u8string FindRCT2SteamPath() |
| 768 | { |
| 769 | auto steamPaths = Platform::GetSteamPaths(); |
| 770 | if (steamPaths.isSteamPresent()) |
| 771 | { |
| 772 | const std::array<Platform::SteamGameData, 2> gamesToCheck = { |
| 773 | Platform::kSteamRCT2Data, |
| 774 | Platform::kSteamRCTCData, |
| 775 | }; |
| 776 | for (const auto& root : steamPaths.roots) |
| 777 | { |
| 778 | for (const auto& game : gamesToCheck) |
| 779 | { |
| 780 | auto nativePath = Path::Combine(root, steamPaths.nativeFolder, game.nativeFolder); |
| 781 | if (Platform::OriginalGameDataExists(nativePath)) |
| 782 | { |
| 783 | return nativePath; |
| 784 | } |
| 785 | if (!steamPaths.downloadDepotFolder.empty()) |
| 786 | { |
| 787 | auto downloadDepotPath = steamPaths.getDownloadDepotFolder(root, game); |
| 788 | if (Platform::OriginalGameDataExists(downloadDepotPath)) |
| 789 | { |
| 790 | return downloadDepotPath; |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | return {}; |
| 798 | } |
| 799 | |
| 800 | /** |
| 801 | * Attempts to find the RCT2 installation directory. |
no test coverage detected