Search for Discord release of RCT2 (#8149)

This commit is contained in:
Ted John 2018-10-25 10:57:19 +01:00 committed by GitHub
parent 95175b44e9
commit f224f7181d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View File

@ -26,6 +26,7 @@
- Improved: [#7930] Automatically create folders for custom content.
- Improved: [#7980] Show the full path of the scenario in the scenario select window.
- Improved: [#7993] Allow assigning a keyboard shortcut for opening the tile inspector.
- Improved: [#8107] Support Discord release of RCT2.
- Improved: Almost completely new Hungarian translation.
- Removed: [#7929] Support for scenario text objects.

View File

@ -24,6 +24,7 @@
#include "../localisation/Language.h"
#include "../network/network.h"
#include "../paint/VirtualFloor.h"
#include "../platform/Platform2.h"
#include "../platform/platform.h"
#include "../scenario/Scenario.h"
#include "../ui/UiContext.h"
@ -684,6 +685,12 @@ namespace Config
}
}
auto discordPath = Platform::GetFolderPath(SPECIAL_FOLDER::RCT2_DISCORD);
if (!discordPath.empty() && platform_original_game_data_exists(discordPath.c_str()))
{
return discordPath;
}
if (platform_original_game_data_exists(gExePath))
{
return gExePath;

View File

@ -115,6 +115,19 @@ namespace Platform
}
return path;
}
case SPECIAL_FOLDER::RCT2_DISCORD:
{
# ifdef __USE_SHGETKNOWNFOLDERPATH__
auto path = WIN32_GetKnownFolderPath(FOLDERID_LocalAppData);
# else
auto path = WIN32_GetFolderPath(CSIDL_LOCAL_APPDATA);
# endif
if (!path.empty())
{
path = Path::Combine(path, "DiscordGames\\RollerCoaster Tycoon 2 Triple Thrill Pack\\content\\Game");
}
return path;
}
default:
return std::string();
}

View File

@ -20,6 +20,8 @@ enum class SPECIAL_FOLDER
USER_CONFIG,
USER_DATA,
USER_HOME,
RCT2_DISCORD,
};
namespace Platform