diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/sink_context.h | 2 | ||||
-rw-r--r-- | src/common/hex_util.h | 3 | ||||
-rw-r--r-- | src/common/logging/types.h | 2 | ||||
-rw-r--r-- | src/core/crypto/key_manager.cpp | 2 | ||||
-rw-r--r-- | src/core/file_sys/registered_cache.cpp | 13 | ||||
-rw-r--r-- | src/core/frontend/input.h | 1 | ||||
-rw-r--r-- | src/core/hle/api_version.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/mii/manager.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/service.cpp | 6 | ||||
-rw-r--r-- | src/core/hle/service/spl/spl_results.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/spl/spl_types.h | 2 | ||||
-rw-r--r-- | src/input_common/mouse/mouse_poller.cpp | 2 | ||||
-rw-r--r-- | src/input_common/touch_from_button.cpp | 1 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_arb_decompiler.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/about_dialog.cpp | 3 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 6 |
17 files changed, 38 insertions, 15 deletions
diff --git a/src/audio_core/sink_context.h b/src/audio_core/sink_context.h index 66ee4e8a0..9e2b69785 100644 --- a/src/audio_core/sink_context.h +++ b/src/audio_core/sink_context.h @@ -4,6 +4,8 @@ #pragma once +#include <array> +#include <vector> #include "audio_core/common.h" #include "common/common_funcs.h" #include "common/common_types.h" diff --git a/src/common/hex_util.h b/src/common/hex_util.h index a8d414fb8..f5f9e4507 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -53,8 +53,9 @@ template <typename ContiguousContainer> std::string out; out.reserve(std::size(data) * pad_width); + const auto format_str = fmt::runtime(upper ? "{:02X}" : "{:02x}"); for (const u8 c : data) { - out += fmt::format(upper ? "{:02X}" : "{:02x}", c); + out += fmt::format(format_str, c); } return out; diff --git a/src/common/logging/types.h b/src/common/logging/types.h index ee9a1ed84..88b0e9c01 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include <chrono> #include "common/common_types.h" diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index fb451a423..a98daed89 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -835,7 +835,7 @@ void KeyManager::SetKey(S128KeyType id, Key128 key, u64 field1, u64 field2) { "key_area_key_ocean_{:02X}", "key_area_key_system_{:02X}", }; - WriteKeyToFile(category, fmt::format(kak_names.at(field2), field1), key); + WriteKeyToFile(category, fmt::format(fmt::runtime(kak_names.at(field2)), field1), key); } else if (id == S128KeyType::Master) { WriteKeyToFile(category, fmt::format("master_key_{:02X}", field1), key); } else if (id == S128KeyType::Package1) { diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 066c6789a..7a646b5f1 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -58,14 +58,17 @@ static bool FollowsNcaIdFormat(std::string_view name) { static std::string GetRelativePathFromNcaID(const std::array<u8, 16>& nca_id, bool second_hex_upper, bool within_two_digit, bool cnmt_suffix) { - if (!within_two_digit) - return fmt::format(cnmt_suffix ? "{}.cnmt.nca" : "/{}.nca", - Common::HexToString(nca_id, second_hex_upper)); + if (!within_two_digit) { + const auto format_str = fmt::runtime(cnmt_suffix ? "{}.cnmt.nca" : "/{}.nca"); + return fmt::format(format_str, Common::HexToString(nca_id, second_hex_upper)); + } Core::Crypto::SHA256Hash hash{}; mbedtls_sha256_ret(nca_id.data(), nca_id.size(), hash.data(), 0); - return fmt::format(cnmt_suffix ? "/000000{:02X}/{}.cnmt.nca" : "/000000{:02X}/{}.nca", hash[0], - Common::HexToString(nca_id, second_hex_upper)); + + const auto format_str = + fmt::runtime(cnmt_suffix ? "/000000{:02X}/{}.cnmt.nca" : "/000000{:02X}/{}.nca"); + return fmt::format(format_str, hash[0], Common::HexToString(nca_id, second_hex_upper)); } static std::string GetCNMTName(TitleType type, u64 title_id) { diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index 7a047803e..f1747c5b2 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h @@ -4,6 +4,7 @@ #pragma once +#include <functional> #include <memory> #include <string> #include <tuple> diff --git a/src/core/hle/api_version.h b/src/core/hle/api_version.h index 811732179..5e10a7ad9 100644 --- a/src/core/hle/api_version.h +++ b/src/core/hle/api_version.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include "common/common_types.h" // This file contains yuzu's HLE API version constants. diff --git a/src/core/hle/service/mii/manager.h b/src/core/hle/service/mii/manager.h index ec7efa5f7..8e048fc56 100644 --- a/src/core/hle/service/mii/manager.h +++ b/src/core/hle/service/mii/manager.h @@ -4,6 +4,8 @@ #pragma once +#include <array> +#include <vector> #include "common/bit_field.h" #include "common/common_funcs.h" #include "common/uuid.h" diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 4e1541630..663b83cd3 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -149,10 +149,10 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext std::string function_name = info == nullptr ? fmt::format("{}", ctx.GetCommand()) : info->name; fmt::memory_buffer buf; - fmt::format_to(buf, "function '{}': port='{}' cmd_buf={{[0]=0x{:X}", function_name, - service_name, cmd_buf[0]); + fmt::format_to(std::back_inserter(buf), "function '{}': port='{}' cmd_buf={{[0]=0x{:X}", + function_name, service_name, cmd_buf[0]); for (int i = 1; i <= 8; ++i) { - fmt::format_to(buf, ", [{}]=0x{:X}", i, cmd_buf[i]); + fmt::format_to(std::back_inserter(buf), ", [{}]=0x{:X}", i, cmd_buf[i]); } buf.push_back('}'); diff --git a/src/core/hle/service/spl/spl_results.h b/src/core/hle/service/spl/spl_results.h index 878fa91b7..a07c61409 100644 --- a/src/core/hle/service/spl/spl_results.h +++ b/src/core/hle/service/spl/spl_results.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include "core/hle/result.h" namespace Service::SPL { diff --git a/src/core/hle/service/spl/spl_types.h b/src/core/hle/service/spl/spl_types.h index 23c39f7ed..a654e7556 100644 --- a/src/core/hle/service/spl/spl_types.h +++ b/src/core/hle/service/spl/spl_types.h @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#pragma once + #include <span> #include "common/bit_field.h" diff --git a/src/input_common/mouse/mouse_poller.cpp b/src/input_common/mouse/mouse_poller.cpp index d96104a4e..758f7af1f 100644 --- a/src/input_common/mouse/mouse_poller.cpp +++ b/src/input_common/mouse/mouse_poller.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <algorithm> +#include <memory> #include <mutex> #include <utility> diff --git a/src/input_common/touch_from_button.cpp b/src/input_common/touch_from_button.cpp index e94ba197b..5b24fd8bf 100644 --- a/src/input_common/touch_from_button.cpp +++ b/src/input_common/touch_from_button.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <algorithm> #include "common/settings.h" #include "core/frontend/framebuffer_layout.h" #include "input_common/touch_from_button.h" diff --git a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp index 3e4d88c30..e8d8d2aa5 100644 --- a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp @@ -454,7 +454,7 @@ private: template <typename... Args> void AddExpression(std::string_view text, Args&&... args) { - shader_source += fmt::format(text, std::forward<Args>(args)...); + shader_source += fmt::format(fmt::runtime(text), std::forward<Args>(args)...); } template <typename... Args> diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index ac78d344c..9c28498e8 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -96,7 +96,7 @@ public: // etc). template <typename... Args> void AddLine(std::string_view text, Args&&... args) { - AddExpression(fmt::format(text, std::forward<Args>(args)...)); + AddExpression(fmt::format(fmt::runtime(text), std::forward<Args>(args)...)); AddNewLine(); } diff --git a/src/yuzu/about_dialog.cpp b/src/yuzu/about_dialog.cpp index a2e0e6962..6b0155a78 100644 --- a/src/yuzu/about_dialog.cpp +++ b/src/yuzu/about_dialog.cpp @@ -14,7 +14,8 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDia const auto build_id = std::string(Common::g_build_id); const auto yuzu_build = fmt::format("yuzu Development Build | {}-{}", branch_name, description); - const auto override_build = fmt::format(std::string(Common::g_title_bar_format_idle), build_id); + const auto override_build = + fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id); const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; ui->setupUi(this); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 75ab5ef44..6f5b2f6d6 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -236,7 +236,8 @@ GMainWindow::GMainWindow() const auto build_id = std::string(Common::g_build_id); const auto yuzu_build = fmt::format("yuzu Development Build | {}-{}", branch_name, description); - const auto override_build = fmt::format(std::string(Common::g_title_bar_format_idle), build_id); + const auto override_build = + fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id); const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; LOG_INFO(Frontend, "yuzu Version: {}", yuzu_build_version); @@ -2858,7 +2859,8 @@ void GMainWindow::UpdateWindowTitle(const std::string& title_name, const auto build_id = std::string(Common::g_build_id); const auto yuzu_title = fmt::format("yuzu | {}-{}", branch_name, description); - const auto override_title = fmt::format(std::string(Common::g_title_bar_format_idle), build_id); + const auto override_title = + fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id); const auto window_title = override_title.empty() ? yuzu_title : override_title; if (title_name.empty()) { |