mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Search for Discord release of RCT2 (#8149)
This commit is contained in:
parent
95175b44e9
commit
f224f7181d
4 changed files with 23 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ enum class SPECIAL_FOLDER
|
|||
USER_CONFIG,
|
||||
USER_DATA,
|
||||
USER_HOME,
|
||||
|
||||
RCT2_DISCORD,
|
||||
};
|
||||
|
||||
namespace Platform
|
||||
|
|
Loading…
Reference in a new issue