1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Close #11437: Migrate old platform methods

This commit is contained in:
Michael Steenbeek
2022-02-18 21:57:00 +01:00
committed by GitHub
parent b424682934
commit 5edc561715
81 changed files with 613 additions and 793 deletions

View File

@@ -24,7 +24,7 @@
#include "../drawing/X8DrawingEngine.h"
#include "../localisation/Formatter.h"
#include "../localisation/Localisation.h"
#include "../platform/Platform2.h"
#include "../platform/Platform.h"
#include "../util/Util.h"
#include "../world/Climate.h"
#include "../world/Map.h"
@@ -128,7 +128,7 @@ static std::string screenshot_get_formatted_date_time()
static std::optional<std::string> screenshot_get_next_path()
{
auto screenshotDirectory = screenshot_get_directory();
if (!platform_ensure_directory_exists(screenshotDirectory.c_str()))
if (!Platform::EnsureDirectoryExists(screenshotDirectory.c_str()))
{
log_error("Unable to save screenshots in OpenRCT2 screenshot directory.");
return std::nullopt;
@@ -529,7 +529,7 @@ int32_t cmdline_for_gfxbench(const char** argv, int32_t argc)
return -1;
}
core_init();
Platform::CoreInit();
int32_t iterationCount = 5;
if (argc == 2)
{
@@ -626,7 +626,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption
rct_drawpixelinfo dpi;
try
{
core_init();
Platform::CoreInit();
bool customLocation = false;
bool centreMapX = false;
bool centreMapY = false;