Remove platform_get_openrct2_data_path()

This commit is contained in:
Gymnasiast 2022-01-05 14:26:00 +01:00
parent 77e5defeca
commit 2e7e90a018
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
4 changed files with 3 additions and 21 deletions

View File

@ -1557,14 +1557,3 @@ void platform_get_user_directory(utf8* outPath, const utf8* subDirectory, size_t
}
String::Set(outPath, outSize, path.c_str());
}
/**
* This function is deprecated.
* Use IPlatformEnvironment instead.
*/
void platform_get_openrct2_data_path(utf8* outPath, size_t outSize)
{
auto env = GetContext()->GetPlatformEnvironment();
auto path = env->GetDirectoryPath(DIRBASE::OPENRCT2);
String::Set(outPath, outSize, path.c_str());
}

View File

@ -265,10 +265,10 @@ bool gfx_load_g2()
{
log_verbose("gfx_load_g2()");
char path[MAX_PATH];
auto env = GetContext()->GetPlatformEnvironment();
std::string path = Path::Combine(env->GetDirectoryPath(DIRBASE::OPENRCT2), "g2.dat");
platform_get_openrct2_data_path(path, sizeof(path));
safe_strcat_path(path, "g2.dat", MAX_PATH);
try
{
auto fs = FileStream(path, FILE_MODE_OPEN);

View File

@ -137,12 +137,6 @@ MeasurementFormat platform_get_locale_measurement_format()
}
}
void platform_get_changelog_path(utf8* outPath, size_t outSize)
{
platform_get_openrct2_data_path(outPath, outSize);
safe_strcat_path(outPath, "changelog.txt", outSize);
}
bool platform_get_steam_path(utf8* outPath, size_t outSize)
{
char steamPath[1024] = { 0 };

View File

@ -104,7 +104,6 @@ bool platform_file_move(const utf8* srcPath, const utf8* dstPath);
bool platform_file_delete(const utf8* path);
uint32_t platform_get_ticks();
void platform_sleep(uint32_t ms);
void platform_get_openrct2_data_path(utf8* outPath, size_t outSize);
void platform_get_user_directory(utf8* outPath, const utf8* subDirectory, size_t outSize);
std::string platform_get_username();
bool platform_open_common_file_dialog(utf8* outFilename, file_dialog_desc* desc, size_t outSize);