1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00

Replace std::printf with Console::*

This commit is contained in:
Ted John
2021-02-18 18:05:53 +00:00
parent 2e0841e6f4
commit ed29c0a37b

View File

@@ -14,6 +14,7 @@
#include <SDL.h>
#include <openrct2/Context.h>
#include <openrct2/PlatformEnvironment.h>
#include <openrct2/core/Console.hpp>
#include <openrct2/core/DataSerialiser.h>
#include <openrct2/core/FileStream.h>
#include <openrct2/core/FileSystem.hpp>
@@ -198,24 +199,24 @@ void ShortcutManager::LoadUserBindings()
{
try
{
std::printf("Importing legacy shortcuts...\n");
Console::WriteLine("Importing legacy shortcuts...");
auto legacyPath = fs::u8path(_env->GetFilePath(PATHID::CONFIG_SHORTCUTS_LEGACY));
if (fs::exists(legacyPath))
{
LoadLegacyBindings(legacyPath);
SaveUserBindings();
std::printf("Legacy shortcuts imported\n");
Console::WriteLine("Legacy shortcuts imported");
}
}
catch (const std::exception& e)
{
std::fprintf(stderr, "Unable to import legacy shortcut bindings: %s\n", e.what());
Console::Error::WriteLine("Unable to import legacy shortcut bindings: %s", e.what());
}
}
}
catch (const std::exception& e)
{
std::fprintf(stderr, "Unable to load shortcut bindings: %s\n", e.what());
Console::Error::WriteLine("Unable to load shortcut bindings: %s", e.what());
}
}
@@ -317,7 +318,7 @@ void ShortcutManager::SaveUserBindings()
}
catch (const std::exception& e)
{
std::fprintf(stderr, "Unable to save shortcut bindings: %s\n", e.what());
Console::Error::WriteLine("Unable to save shortcut bindings: %s", e.what());
}
}