From ed29c0a37b8afcaa2fa78eeabc9382dfcde97135 Mon Sep 17 00:00:00 2001 From: Ted John Date: Thu, 18 Feb 2021 18:05:53 +0000 Subject: [PATCH] Replace std::printf with Console::* --- src/openrct2-ui/input/ShortcutManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/openrct2-ui/input/ShortcutManager.cpp b/src/openrct2-ui/input/ShortcutManager.cpp index 5f82a2cca5..c5fb07d5d7 100644 --- a/src/openrct2-ui/input/ShortcutManager.cpp +++ b/src/openrct2-ui/input/ShortcutManager.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -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()); } }